Studying Angular2. There is a variable output in the component template header:
<div class="header-block header-block-search"> {{ date | date:'dd-MM-yyyy HH:mm:ss' }} </div> In the .ts component itself:
export class HeaderComponent implements OnInit { date: Date = new Date(); ... - How to make the option to time (seconds) dynamically changed on the page?
- How to make an option for the date format: 'dd-MM-yyyy HH: mm', so that the ":" symbol flashes every second?
I understand intuitively that you need to look towards the creation of an asynchronous pipe, but have not yet found an example of how to implement it.