Ask a question+
$0.94Angular : How to use app.tick() ? Can anyone give me an example of ApplicationRef.tick()?
When we talk about Change Detection mechanism in Angular 2, everyone suggests using NgZone or ChangeDetectorRef.
Is there any working example of application.tick()/ApplicationRef.tick() which also does the same thing as ChangeDetectorRef/NgZone.
Second question: API says, in DEV MODE, ApplicationRef.tick() runs the change detection more than once.
Is there a way to run it only once. Because the moment I use this method, I get an error saying
ApplicationRef.tick() is called recursively
Similar example of the problem I face using tick() is here in this Github Link
I have gone through Triggering Change Detection Manually Question.
Any info in this appreciated. Thanks.
- 1How can I filter questions by programming language in Stack Dev?
- 1angular-route VS angular-ui-router
- 1Can't add AMP Variable for Google Tag Manager
- 5What is "marquee" tag and how I can use it in HTML?
- 4What FREE web hosting to use
- 1What is PATH, and when to use it in C++
- 2Can't run flutter project: No connected device
- 2How to run Nuxt app with forever
- 4How can I rename git local and remote branch name?
- 2How can I set an HTML text input to allow only numeric input?