MCPcopy Create free account
hub / github.com/angular/angular / assertNotInAngularZone

Method assertNotInAngularZone

packages/core/src/zone/ng_zone.ts:210–217  ·  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

208 Assures that the method is called outside of the Angular Zone, otherwise throws an error.
209 */
210 static assertNotInAngularZone(): void {
211 if (NgZone.isInAngularZone()) {
212 throw new RuntimeError(
213 RuntimeErrorCode.UNEXPECTED_ZONE_STATE,
214 ngDevMode && 'Expected to not be in Angular Zone, but it is!',
215 );
216 }
217 }
218
219 /**
220 * 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