Skip to content

Conversation

@atscott
Copy link
Contributor

@atscott atscott commented Aug 7, 2023

Empty path routes are effectively 'passthrough' routes that do not appear in the URL. When these exist in the route tree, we do not want to apply named outlet commands to that tree location. Instead, we skip past this location in the tree, effectively squashing/removing this passthrough route from the tree.

fixes #50356

@atscott atscott added area: router target: patch This PR is targeted for the next patch release labels Aug 7, 2023
@ngbot ngbot bot added this to the Backlog milestone Aug 7, 2023
…g in the URL

Empty path routes are effectively 'passthrough' routes that do not
appear in the URL. When these exist in the route tree, we do not want to
apply named outlet commands to that tree location. Instead, we skip past
this location in the tree, effectively squashing/removing this
passthrough route from the tree.

fixes angular#50356
@atscott atscott changed the title fix(router): Do not appyly aux commands to empty paths not appearing … fix(router): Apply named outlets to children of empty paths not appearing in the URL Aug 7, 2023
@atscott
Copy link
Contributor Author

atscott commented Aug 7, 2023

Green TGP

@atscott atscott marked this pull request as ready for review August 7, 2023 22:15
@atscott atscott requested a review from AndrewKushnir August 9, 2023 21:36
@atscott atscott added action: merge The PR is ready for merge by the caretaker merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note labels Aug 9, 2023
@atscott
Copy link
Contributor Author

atscott commented Aug 9, 2023

caretaker note: probably a good idea to merge and sync this one on its own.

@pkozlowski-opensource
Copy link
Member

This PR was merged into the repository by commit 4e22a39.

pkozlowski-opensource pushed a commit that referenced this pull request Aug 10, 2023
…g in the URL (#51292)

Empty path routes are effectively 'passthrough' routes that do not
appear in the URL. When these exist in the route tree, we do not want to
apply named outlet commands to that tree location. Instead, we skip past
this location in the tree, effectively squashing/removing this
passthrough route from the tree.

fixes #50356

PR Close #51292
@Niaro
Copy link

Niaro commented Aug 17, 2023

@atscott it seems the issue is still there...😭 Updated to 16.2.1 and still cannot use the aux outlet

@Niaro
Copy link

Niaro commented Aug 17, 2023

@atscott So on the page we have a lot of routerLinks with an aux outlet.

<a
   [routerLink]="[{
	outlets: { '[right-drawer][1]': [ 'transaction', { id: row.id } ] }
    }]"
>link</a>

Upon navigation to the aux route, all the hrefs id get mutated to the one that was open, and this is it all links are the same, no navigation is possible.

Somehow routerLinks outlets get affected by the current router state...

@atscott
Copy link
Contributor Author

atscott commented Aug 21, 2023

@Niaro Please provide a reproduction

@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 21, 2023
ChellappanRajan pushed a commit to ChellappanRajan/angular that referenced this pull request Jan 23, 2024
…g in the URL (angular#51292)

Empty path routes are effectively 'passthrough' routes that do not
appear in the URL. When these exist in the route tree, we do not want to
apply named outlet commands to that tree location. Instead, we skip past
this location in the tree, effectively squashing/removing this
passthrough route from the tree.

fixes angular#50356

PR Close angular#51292
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: router merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Router createUrlTree can't change auxiliary route

4 participants