NgZone
This is the documentation for Angular 6.
You can switch to the latest version Angular 10.
You can switch to the latest version Angular 10.
An injectable service for executing work inside or outside of the Angular zone.
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
.
Interface
Methods
run()
#
run<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T
runTask()
#
runTask<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[], name?: string): T
runGuarded()
#
runGuarded()
runOutsideAngular()
#
runOutsideAngular<T>(fn: (...args: any[]) => T): T
Properties
hasPendingMicrotasks
#
hasPendingMicrotasks: boolean
hasPendingMacrotasks
#
hasPendingMacrotasks: boolean
isStable
#
isStable: boolean
onUnstable
#
onUnstable: EventEmitter<any>
onMicrotaskEmpty
#
onMicrotaskEmpty: EventEmitter<any>
onStable
#
onStable: EventEmitter<any>
onError
#
onError: EventEmitter<any>