How to set timer for a button function

Hello guys,

I’m trying to create a button which fires every 1 minute once it’s clicked on.
How can I do this on angular 5 typescript?

Thanks,

setTimeout is your friend
–> https://www.w3schools.com/jsref/met_win_settimeout.asp

1 Like

Thanks, yes, that would work!

But if you guys know any hidden property of angular which does this, please let me know as well.

No, no such thing exists in Angular.

1 Like

You might want to mark this thread as solved.
This is easier for other people with the same problem in the future.

1 Like

Problem solved!
Thanks,

setTimeout is the way to go, or use the RxJs interval function.

1 Like