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

Method synchronize

packages/upgrade/static/src/upgrade_module.ts:309–323  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

307 // We need to do this in the next tick so that we don't prevent the bootup stabilizing
308 setTimeout(() => {
309 const synchronize = () => {
310 this.ngZone.run(() => {
311 if ($rootScope.$$phase) {
312 if (typeof ngDevMode === 'undefined' || ngDevMode) {
313 console.warn(
314 'A digest was triggered while one was already in progress. This may mean that something is triggering digests outside the Angular zone.',
315 );
316 }
317
318 $rootScope.$evalAsync();
319 } else {
320 $rootScope.$digest();
321 }
322 });
323 };
324 const subscription =
325 // We _DO NOT_ usually want to have any code that does one thing for zoneless and another for ZoneJS.
326 // This is only here because there is not enough coverage for hybrid apps anymore so we cannot

Callers

nothing calls this directly

Calls 4

runMethod · 0.65
warnMethod · 0.65
$evalAsyncMethod · 0.65
$digestMethod · 0.65

Tested by

no test coverage detected