fix(ivy): fix issue with refreshing embedded views (#23164)

PR Close #23164
This commit is contained in:
Pawel Kozlowski
2018-04-04 14:40:06 +02:00
committed by Igor Minar
parent 3b607e60e9
commit fc813f67f4
2 changed files with 11 additions and 2 deletions

View File

@ -442,6 +442,7 @@ export function renderEmbeddedTemplate<T>(
renderer: Renderer3): LViewNode {
const _isParent = isParent;
const _previousOrParentNode = previousOrParentNode;
let oldView: LView;
try {
isParent = true;
previousOrParentNode = null !;
@ -456,14 +457,14 @@ export function renderEmbeddedTemplate<T>(
viewNode = createLNode(null, LNodeType.View, null, view);
cm = true;
}
enterView(viewNode.data, viewNode);
oldView = enterView(viewNode.data, viewNode);
template(context, cm);
refreshDirectives();
refreshDynamicChildren();
} finally {
leaveView(currentView && currentView !.parent !);
leaveView(oldView !);
isParent = _isParent;
previousOrParentNode = _previousOrParentNode;
}