I've just started going into the Angular2 change detection mechanism.
I've read Thoughram's blog posts on the subject (the ones on ZoneJS and on Angular2 zones) but still there's 1 term I can't find any definition for.
Here's an excerpt from this post:
NgZone is basically a forked zone that extends its API and adds some additional functionality to its execution context. One of the things it adds to the API is the following set of custom events we can subscribe to, as they are observable streams:
onTurnStart() - Notifies subscribers just before Angular’s event turn starts. Emits an event once per browser task that is handled by Angular.
onTurnDone() - Notifies subscribers immediately after Angular’s zone is done processing the current turn and any micro tasks scheduled from that turn.
onEventDone() - Notifies subscribers immediately after the final onTurnDone() callback before ending VM event. Useful for testing to validate application state
I understand the concept of a zone and that it can be forked, the only problem I have is with VM turn
and VM event
, for which I can't find any definition.
What are these VM events and turns? are they part of ZoneJS, Angular or just the browser?
Thanks, Avi.