Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ivy): support ng-container inside another ng-container #25346

Conversation

pkozlowski-opensource
Copy link
Member

This PR takes care of the following cases wrt to <ng-container>:

Nested <ng-container>:

<ng-container>
  <ng-container>
    <ng-container>
      content
    </ng-container>
  </ng-container>
</ng-container>

Nested <ng-container> in a view with delayed insertion:

<ng-template testDirective>
	<ng-container>
	  <ng-container>
	    <ng-container>
	      content
	    </ng-container>
	  </ng-container>
	</ng-container>
</ng-template> 

Changes in the code are minimal so most of the diff is about tests.

@mary-poppins
Copy link

You can preview 8de4940 at https://pr25346-8de4940.ngbuilds.io/.

@pkozlowski-opensource pkozlowski-opensource added action: review The PR is still awaiting reviews from at least one requested reviewer target: major This PR is targeted for the next major release comp: ivy labels Aug 7, 2018
let grandParent = getParentLNode(parent as LElementContainerNode);
while (grandParent.tNode.type === TNodeType.ElementContainer) {
grandParent = getParentLNode(grandParent as LElementContainerNode);
}
if (grandParent.tNode.type === TNodeType.View) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the canInsertNativeNode counterpart, we account for grandParent being null here. Is that relevant here too?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, since we've already checked (in the canInsertNativeNode) that it can be inserted so there should be a render parent somewhere above.

@mhevery mhevery removed the action: review The PR is still awaiting reviews from at least one requested reviewer label Aug 7, 2018
@mhevery
Copy link
Contributor

mhevery commented Aug 7, 2018

@mhevery mhevery added the action: merge The PR is ready for merge by the caretaker label Aug 7, 2018
@kara kara closed this in dbdbbdb Aug 7, 2018
FrederikSchlemmer pushed a commit to FrederikSchlemmer/angular that referenced this pull request Jan 3, 2019
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants