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

Method detectChanges

packages/core/src/render3/view_ref.ts:307–315  ·  view source on GitHub ↗

* Checks the view and its children. * * This can also be used in combination with ChangeDetectorRef#detach to implement * local change detection checks. * * <!-- TODO: Add a link to a chapter on detach/reattach/local digest --> * <!-- TODO: Add a live demo once ref.detectCh

()

Source from the content-addressed store, hash-verified

305 * See {@link ChangeDetectorRef#detach} for more information.
306 */
307 detectChanges(): void {
308 // Add `RefreshView` flag to ensure this view is refreshed if not already dirty.
309 // `RefreshView` flag is used intentionally over `Dirty` because it gets cleared before
310 // executing any of the actual refresh code while the `Dirty` flag doesn't get cleared
311 // until the end of the refresh. Using `RefreshView` prevents creating a potential difference
312 // in the state of the LViewFlags during template execution.
313 this._lView[FLAGS] |= LViewFlags.RefreshView;
314 detectChangesInternal(this._lView);
315 }
316
317 /**
318 * Checks the change detector and its children, and throws if any changes are detected.

Callers 15

noopAnimationTestsFunction · 0.45
validateHtmlFunction · 0.45
index_spec.tsFile · 0.45
flushEffectsFunction · 0.45
to_signal_spec.tsFile · 0.45
ngAfterViewInitMethod · 0.45

Calls 1

detectChangesInternalFunction · 0.90

Tested by

no test coverage detected