Created
May 19, 2018 13:01
-
-
Save alexzuza/301be545c9cf8a61132960a0a7ce8929 to your computer and use it in GitHub Desktop.
Ivy detect changes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function detectChanges<T>(component: T): void { | |
const hostNode = _getComponentHostLElementNode(component); | |
ngDevMode && assertNotNull(hostNode.data, 'Component host node should be attached to an LView'); | |
const componentIndex = hostNode.tNode !.flags >> TNodeFlags.DirectiveStartingIndexShift; | |
const def = hostNode.view.tView.directives ![componentIndex] as ComponentDef<T>; | |
detectChangesInternal(hostNode.data as LView, hostNode, def, component); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment