MCPcopy Index your code
hub / github.com/angular/angular / assertInAngularZone

Method assertInAngularZone

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

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

()

Source from the content-addressed store, hash-verified

199 Assures that the method is called within the Angular Zone, otherwise throws an error.
200 */
201 static assertInAngularZone(): void {
202 if (!NgZone.isInAngularZone()) {
203 throw new RuntimeError(
204 RuntimeErrorCode.UNEXPECTED_ZONE_STATE,
205 ngDevMode && 'Expected to be in Angular Zone, but it is not!',
206 );
207 }
208 }
209
210 /**
211 Assures that the method is called outside of the Angular Zone, otherwise throws an error.

Callers 4

throwIfNeededMethod · 0.80
commonTestsFunction · 0.80
initializeMethod · 0.80
ngAfterViewCheckedMethod · 0.80

Implementers 1

NoopNgZonepackages/core/src/zone/ng_zone.ts

Calls 1

isInAngularZoneMethod · 0.80

Tested by

no test coverage detected