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/1cde9dd60b66433c40e8a15e8cb99bed to your computer and use it in GitHub Desktop.
Save chidumennamdi/1cde9dd60b66433c40e8a15e8cb99bed to your computer and use it in GitHub Desktop.
function updateProp(
view: ViewData, providerData: ProviderData, def: NodeDef, bindingIdx: number, value: any,
changes: SimpleChanges): SimpleChanges {
if (def.flags & NodeFlags.Component) {
const compView = asElementData(view, def.parent !.nodeIndex).componentView;
if (compView.def.flags & ViewFlags.OnPush) {
compView.state |= ViewState.ChecksEnabled;
}
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment