fix(ivy): properly insert views before ng-container with injected ViewContainerRef (#33853)
PR Close #33853
This commit is contained in:

committed by
Alex Rickabaugh

parent
839ac3c0a7
commit
c7a3694eb9
@ -682,7 +682,6 @@ function getFirstNativeNode(lView: LView, tNode: TNode | null): RNode|null {
|
||||
TNodeType.IcuContainer, TNodeType.Projection);
|
||||
|
||||
const tNodeType = tNode.type;
|
||||
|
||||
if (tNodeType === TNodeType.Element) {
|
||||
return getNativeByTNode(tNode, lView);
|
||||
} else if (tNodeType === TNodeType.Container) {
|
||||
@ -692,7 +691,12 @@ function getFirstNativeNode(lView: LView, tNode: TNode | null): RNode|null {
|
||||
if (elIcuContainerChild !== null) {
|
||||
return getFirstNativeNode(lView, elIcuContainerChild);
|
||||
} else {
|
||||
return getNativeByTNode(tNode, lView);
|
||||
const rNodeOrLContainer = lView[tNode.index];
|
||||
if (isLContainer(rNodeOrLContainer)) {
|
||||
return getBeforeNodeForView(-1, rNodeOrLContainer);
|
||||
} else {
|
||||
return unwrapRNode(rNodeOrLContainer);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
const componentView = lView[DECLARATION_COMPONENT_VIEW];
|
||||
|
Reference in New Issue
Block a user