What is the role of ngZone in Angular, and how does it help with async operations?
- NgZone monitors async operations (like promises, timers) and triggers Angular’s
change detection automatically after they complete.
- It helps Angular know when to update the UI.
- You can run code outside Angular’s zone to avoid unnecessary change detection,
improving performance.