Angular 2 - Countdown timer
问题 I am willing to do a countdown timer in Angular 2 that start from 60 (i.e 59, 58,57, etc...) For that I have the following: constructor(){ Observable.timer(0,1000).subscribe(timer=>{ this.counter = timer; }); } The above, ticks every second, which is fine; however, it goes in an ascending order to an unlimited number. I am not sure if there is a way to tweak it so I can have a countdown timer. 回答1: There are many ways to achieve this, a basic example is to use the take operator import {