Angular: Countdown
Jump to navigation
Jump to search
<strong>let</strong> countDownValue = 5;
<strong>let</strong> countDownTimerSubs = timer(0, 1000)
.pipe(
take(countDownValue),
map(() => --countDownValue)
)
.subscribe(val => {
countDownValue = val;
<strong>this</strong>.insignia_content = val.toString();
});