Angular & Signals (283 Qs)•Part 4: JIT vs AOT Compilation, Metadata & TypeScript (76 - 100)
What is zone?
A Zone is an execution context that persists across async tasks. Angular relies on zone.js to run Angular's change detection processes when native JavaScript operations raise events
Practical Code Example
typescript
// Zone.js: Execution context that intercepts asynchronous operations
// (setTimeout, fetch, click) to automatically trigger Angular change detection:
setTimeout(() => {
this.title = 'Updated'; // Zone.js detects callback completion and notifies Angular!
}, 1000);