fix(ivy): Run ChangeDetection on transplanted views (#33644)

https://hackmd.io/@mhevery/rJUJsvv9H

Closes #33393

PR Close #33644
This commit is contained in:
Misko Hevery
2019-11-07 06:32:59 +00:00
committed by Kara Erickson
parent 641c671bac
commit b62b11bd6b
10 changed files with 204 additions and 30 deletions

View File

@ -56,9 +56,10 @@ export function getRootView(componentOrLView: LView | {}): LView {
*/
export function findComponentView(lView: LView): LView {
let rootTNode = lView[T_HOST];
while (rootTNode !== null && rootTNode.type === TNodeType.View) {
ngDevMode && assertDefined(lView[DECLARATION_VIEW], 'lView[DECLARATION_VIEW]');
lView = lView[DECLARATION_VIEW] !;
let declaredView: LView|null;
while (rootTNode !== null && rootTNode.type === TNodeType.View &&
(declaredView = lView[DECLARATION_VIEW]) !== null) {
lView = declaredView;
rootTNode = lView[T_HOST];
}
ngDevMode && assertLView(lView);