fix(ivy): calling ChangeDetectorRef.detectChanges() from onChanges should not go infinite loop (#28239)

PR Close #28239
This commit is contained in:
Marc Laval
2019-01-18 14:16:41 +01:00
committed by Jason Aden
parent 664ea50b46
commit 873750609f
2 changed files with 62 additions and 1 deletions

View File

@ -68,6 +68,9 @@ export function refreshDescendantViews(lView: LView) {
tView.firstTemplatePass = false;
setFirstTemplatePass(false);
// Resetting the bindingIndex of the current LView as the next steps may trigger change detection.
lView[BINDING_INDEX] = tView.bindingStartIndex;
// If this is a creation pass, we should not call lifecycle hooks or evaluate bindings.
// This will be done in the update pass.
if (!isCreationMode(lView)) {