NgZone class

Handles and observes the side-effects of executing callbacks in AngularDart.

Most applications will not need to access or use this class. It may be used in order to get hooks into the application lifecycle or for hiding asynchronous actions from AngularDart that occur frequently (such as mouse movement, or a polling timer) and have a costly impact on change detection.

Constructors

NgZone()
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
hasPendingMacrotasks bool
Whether there are any outstanding microtasks.
no setter
hasPendingMicrotasks bool
Whether there are any outstanding microtasks.
no setter
inInnerZone bool
Whether we are currently executing within this AngularDart zone.
no setter
inOuterZone bool
Whether we are currently executing outside of the AngularDart zone.
no setter
isRunning bool
Whether onTurnStart has been triggered and onTurnDone has not.
no setter
onEventDone Stream<void>
Notifies when there are no more microtasks enqueued within this zone.
no setter
onMicrotaskEmpty Stream<void>
Notifies when there are no more microtasks enqueued within this zone.
no setter
onTurnDone Stream<void>
Notifies when a final callback is executed within this zone.
no setter
onTurnStart Stream<void>
Notifies when an initial callback is executed within this zone.
no setter
onUncaughtError Stream<UncaughtError>
Notifies that an uncaught error was thrown insing of the zone.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Disables additional collection of asynchronous tasks.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
run<R>(R callback()) → R
Executes and returns callback function synchronously within this zone.
runAfterChangesObserved(void callback()) → void
Executes a callback after changes were observed by the zone.
runGuarded(void callback()) → void
Executes callback function synchronously within this zone.
runOutsideAngular<R>(R callback()) → R
Executes and returns callback function synchronously outside this zone.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited