What is ngzone in angular
Loading
What is ngzone in angular
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Brahma Prakash ShuklaPosted Nov 15, 2022, 6:37 AM
NgZone is just a wrapper angular service around
Zone.js's API.Vishal YelvePosted Nov 15, 2022, 6:31 AM
The most common use of this service is to optimize performance when starting a work consisting of one or more asynchronous tasks that don't require UI updates or error handling to be handled by Angular. Such tasks can be kicked off via runOutsideAngular and if needed, these tasks can reenter the Angular zone via run.
Refer below link
https://angular.io/api/core/NgZone
NitinPosted Nov 15, 2022, 4:29 AM
The run() method of the NgZone service enables you to execute a function inside the Angular zone. This function automatically initiates change detection at the appropriate time, as do all asynchronous activities within it.