質問

What is the best way to update a variable every second?

What I want is that when the user clicks on a button, it will make variable x be updated (added 1, for example) every second.

役に立ちましたか?

解決

Angular's interval Service

Angular's wrapper for window.setInterval. The fn function is executed every delay milliseconds.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top