set timer for 30 seconds for otp in typescript

The solution for “set timer for 30 seconds for otp in typescript” can be found here. The following code will assist you in solving the problem.

countdown() {

let thisRef=this;
setInterval(function () {
thisRef.timeLeft–;
thisRef.ChangeDetectorRef.detectChanges();

}, 1000);
}

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

0
inline scripts encapsulated in