且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

停止Angular2倒数计时

更新时间:2023-11-17 16:40:28

我最终创建了一个称为 stopTimer()的函数,即:

I ended up creating a function called stopTimer() that is :

stopTimer(){
        this.countDown = null;
        this.sub.unsubscribe();
}

它将停止 Timer 并停止 CountDown