Conversation
`split` is designed to split remaining primary outlet segments alongside empty-path named outlets (`createChildrenForEmptyPaths` wraps `slicedSegments` in `res[PRIMARY_OUTLET]`). When piercing an empty-path route to look for a named outlet among its descendants (`!matchedOnOutlet`), `remainingSegments` belong to that named outlet rather than `PRIMARY_OUTLET`. Previously, `split` was called even when `!matchedOnOutlet`, which required the `isSelfEvaluating` workaround in angular#67708 to ignore an empty-path route for the same outlet being evaluated. However, if the pierced empty-path route also contained another empty-path named outlet sibling (e.g. `tertiary` alongside `secondary`), `split` still moved `secondary`'s segments into `children[PRIMARY_OUTLET]` and caused matching to fail. Skipping `split` when `!matchedOnOutlet` fixes matching when multiple named outlets exist under an empty-path route and allows removing the `outlet` / `isSelfEvaluating` workaround from `split`. Related to angular#67708
atscott
marked this pull request as ready for review
October 1, 2026 16:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
splitis designed to split remaining primary outlet segments alongside empty-path named outlets (createChildrenForEmptyPathswrapsslicedSegmentsinres[PRIMARY_OUTLET]). When piercing an empty-path route to look for a named outlet among its descendants (!matchedOnOutlet),remainingSegmentsbelong to that named outlet rather thanPRIMARY_OUTLET.Previously,
splitwas called even when!matchedOnOutlet, which required theisSelfEvaluatingworkaround in #67708 to ignore an empty-path route for the same outlet being evaluated. However, if the pierced empty-path route also contained another empty-path named outlet sibling (e.g.tertiaryalongsidesecondary),splitstill movedsecondary's segments intochildren[PRIMARY_OUTLET]and caused matching to fail.Skipping
splitwhen!matchedOnOutletfixes matching when multiple named outlets exist under an empty-path route and allows removing theoutlet/isSelfEvaluatingworkaround fromsplit.Related to #67708