Skip to content

Instantly share code, notes, and snippets.

@chidumennamdi
Created August 22, 2018 16:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chidumennamdi/a17e56f9da391f11867dcb19f6069a79 to your computer and use it in GitHub Desktop.
Save chidumennamdi/a17e56f9da391f11867dcb19f6069a79 to your computer and use it in GitHub Desktop.
markForCheck(): void { markParentViewsForCheck(this._view); }
|
V
export function markParentViewsForCheck(view: ViewData) {
let currView: ViewData|null = view;
while (currView) {
if (currView.def.flags & ViewFlags.OnPush) {
currView.state |= ViewState.ChecksEnabled;
}
currView = currView.viewContainerParent || currView.parent;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment