MCPcopy
hub / github.com/angular/angular / markForCheck

Method markForCheck

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

* Marks a view and all of its ancestors dirty. * * This can be used to ensure an ChangeDetectionStrategy#OnPush component is * checked when it needs to be re-rendered but the two normal triggers haven't marked it * dirty (i.e. inputs haven't changed and events haven't fired in th

()

Source from the content-addressed store, hash-verified

160 * ```
161 */
162 markForCheck(): void {
163 markViewDirty(this._cdRefInjectingView || this._lView, NotificationSource.MarkForCheck);
164 }
165
166 /**
167 * Detaches the view from the change detection tree.

Callers 15

setValMethod · 0.80
ngAfterViewInitMethod · 0.80
ngDoCheckMethod · 0.80
ngDoCheckMethod · 0.80
propagateMethod · 0.80

Calls 1

markViewDirtyFunction · 0.90

Tested by 1

changeLinksMethod · 0.64