MCPcopy
hub / github.com/angular/angular / assertNotInAngularZone

Method assertNotInAngularZone

packages/core/src/zone/ng_zone.ts:213–220  ·  view source on GitHub ↗

Assures that the method is called outside of the Angular Zone, otherwise throws an error.

()

Source from the content-addressed store, hash-verified

211 Assures that the method is called outside of the Angular Zone, otherwise throws an error.
212 */
213 static assertNotInAngularZone(): void {
214 if (NgZone.isInAngularZone()) {
215 throw new RuntimeError(
216 RuntimeErrorCode.UNEXPECTED_ZONE_STATE,
217 ngDevMode && 'Expected to not be in Angular Zone, but it is!',
218 );
219 }
220 }
221
222 /**
223 * Executes the `fn` function synchronously within the Angular zone and returns value returned by

Callers 7

logMethod · 0.80
errorMethod · 0.80
logOnErrorFunction · 0.80
commonTestsFunction · 0.80
_watchAngularEventsMethod · 0.80
initializeMethod · 0.80

Implementers 1

NoopNgZonepackages/core/src/zone/ng_zone.ts

Calls 1

isInAngularZoneMethod · 0.80

Tested by

no test coverage detected