Typescript:
countdown;
counter = 10;
tick = 1000;
this.countdown = Observable.timer(0, this.tick)
.take(this.counter)
.map(() => --this.counter)
Also in HTML:
<div>
<h1>Time Remaining</h1>
<h2>{{countdown | async | formatTime}}</h2>
</div>
How can I trigger an event when the counter reaches 0
?