Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(compiler): control flow nodes with root at the end projected incorrectly #58607

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

Closed

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Nov 12, 2024

Fixes an edge case where a control flow node that has non-projectable nodes followed by an element node at the end would cause the entire control flow node to be projected. For example if we have a projection target of Main: <ng-content/> Slot: <ng-content select="[foo]"/>, inserting a node of @if (true) {Hello <span foo>world</span>} would project the entire Hello world into the [foo] slot.

In the process of working on the issue, I also found that @let declarations at the root of the control flow node would prevent content projection as well.

…rrectly

Fixes an edge case where a control flow node that has non-projectable nodes followed by an element node at the end would cause the entire control flow node to be project. For example if we have a projection target of `Main: <ng-content/> Slot: <ng-content select="[foo]"/>`, inserting a node of `@if (true) {Hello <span foo>world</span>}` would project the entire `Hello world` into the `[foo]` slot.

In the process of working on the issue, I also found that `@let` declarations at the root of the control flow node would prevent content projection as well.
@crisbeto crisbeto added action: review The PR is still awaiting reviews from at least one requested reviewer target: rc This PR is targeted for the next release-candidate labels Nov 12, 2024
@angular-robot angular-robot bot added the area: compiler Issues related to `ngc`, Angular's template compiler label Nov 12, 2024
@ngbot ngbot bot added this to the Backlog milestone Nov 12, 2024
@crisbeto crisbeto added the action: global presubmit The PR is in need of a google3 global presubmit label Nov 12, 2024
@crisbeto
Copy link
Member Author

Passing TGP

@crisbeto crisbeto removed the action: global presubmit The PR is in need of a google3 global presubmit label Nov 12, 2024
@crisbeto crisbeto marked this pull request as ready for review November 12, 2024 16:03
@pullapprove pullapprove bot requested a review from AndrewKushnir November 12, 2024 16:04
@crisbeto crisbeto removed the request for review from AndrewKushnir November 12, 2024 16:59
@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Nov 12, 2024
@crisbeto crisbeto modified the milestones: Backlog, v19 final Nov 12, 2024
thePunderWoman pushed a commit that referenced this pull request Nov 12, 2024
…rrectly (#58607)

Fixes an edge case where a control flow node that has non-projectable nodes followed by an element node at the end would cause the entire control flow node to be project. For example if we have a projection target of `Main: <ng-content/> Slot: <ng-content select="[foo]"/>`, inserting a node of `@if (true) {Hello <span foo>world</span>}` would project the entire `Hello world` into the `[foo]` slot.

In the process of working on the issue, I also found that `@let` declarations at the root of the control flow node would prevent content projection as well.

PR Close #58607
@thePunderWoman
Copy link
Contributor

This PR was merged into the repository by commit c421ffd.

The changes were merged into the following branches: main, 19.0.x

@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 Dec 13, 2024
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 area: compiler Issues related to `ngc`, Angular's template compiler target: rc This PR is targeted for the next release-candidate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants