Skip to content

Instantly share code, notes, and snippets.

@jecfish
Last active August 31, 2017 15:37
Show Gist options
  • Save jecfish/14a0f9f669db9fbe4ff649a3e13ad3bf to your computer and use it in GitHub Desktop.
Save jecfish/14a0f9f669db9fbe4ff649a3e13ad3bf to your computer and use it in GitHub Desktop.
// index.ts
import { Element as PolymerElement } from '@polymer/polymer/polymer-element';
import * as view from './top-message.template.html';
import { timeFormatter } from '../../utils';
export class MyTopMessage extends PolymerElement {
static get template() {
return view;
}
constructor() {
super();
}
static get properties() {
return {
time: {
type: Object,
},
displayTime: {
type: Object,
computed: 'timeChanged(time)'
}
};
}
private timeChanged(value: PolyTest.Time) {
return timeFormatter(value);;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment