from 'moment'; @inlineView(` <template> <div class="clock-component clock-component__wrapper"> <div class="clock-component__time"> <span>\${time}</span> </div> <div class="clock-component__date"> <span>\${date}</span> </div> </template> `) export class ClockCustomElement { private time: string; private date: string; public attached(): void { setInterval(() => { this.time = moment().format('HH:mm'); this.date = moment().format('dddd, D MMMM gggg'); }); } }