fix(core): detectChanges() doesn't work on detached instance

Closes #13426
Closes #13472
This commit is contained in:
Miško Hevery
2016-12-13 16:26:22 -08:00
committed by Victor Berchet
parent b56474d067
commit a659259962
3 changed files with 34 additions and 3 deletions

View File

@ -576,7 +576,7 @@ function generateDetectChangesMethod(view: CompileView): o.Statement[] {
}
stmts.push(...view.detectChangesRenderPropertiesMethod.finish());
view.viewChildren.forEach((viewChild) => {
stmts.push(viewChild.callMethod('detectChanges', [DetectChangesVars.throwOnChange]).toStmt());
stmts.push(viewChild.callMethod('internalDetectChanges', [DetectChangesVars.throwOnChange]).toStmt());
});
const afterViewStmts =
view.updateViewQueriesMethod.finish().concat(view.afterViewLifecycleCallbacksMethod.finish());