The problem is as follows: current time changes constantly, each mome
As per Angular documentation on the DatePipe Link, Date.now() can be used.
import { Component } from '@angular/core';
@Component({
selector: 'my-app',
template: `{{ now | date:'HH:mm:ss'}}`
})
export class AppComponent {
now:number;
constructor() {
setInterval(() => {
this.now = Date.now();
}, 1);
}
}