Having a question regarding an article about zone.js
in Angular2+. I was reading an article from blog.angular-university.io. I thought some parts were a bit cryptic and have some questions about it and things I'm not sure if I understand correctly. The article states:
A zone is nothing more than an execution context that survives multiple Javascript VM execution turns.
Does the above statement mean that multiple async callbacks which are stacked in the event queue have one execution context and thus the same value for this
?
It's a generic mechanism which we can use to add extra functionality to the browser. Angular uses Zones internally to trigger change detection.
Angular is changing the async
functions (settimeout
, AJAX, etc) at runtime. Does this mean that besides finishing the callback of the callback also has additional functionality which Angular uses to detect changes
Is my current understanding correct? If not, what's wrong?