Skip to content

Conversation

@atscott
Copy link
Contributor

@atscott atscott commented Oct 24, 2025

this adds support for both leading and trailing segments before/after wildcard route. Exposig the segments in a new _splat param would require a breaking change to the return value of the matchers.

fixes #60821

@atscott atscott added the target: minor This PR is targeted for the next minor release label Oct 24, 2025
@angular-robot angular-robot bot added detected: feature PR contains a feature commit area: router labels Oct 24, 2025
@ngbot ngbot bot added this to the Backlog milestone Oct 24, 2025
@angular-robot angular-robot bot added the detected: breaking change PR contains a commit with a breaking change label Oct 24, 2025
@atscott atscott force-pushed the splattrail branch 2 times, most recently from d9d85d1 to 972968f Compare October 24, 2025 20:09
@atscott atscott added the requires: TGP This PR requires a passing TGP before merging is allowed label Oct 24, 2025
@atscott atscott requested a review from alan-agius4 October 24, 2025 20:11
@pullapprove pullapprove bot removed the requires: TGP This PR requires a passing TGP before merging is allowed label Oct 24, 2025
@atscott atscott removed the detected: breaking change PR contains a commit with a breaking change label Oct 24, 2025
this adds support for both leading and trailing segments before/after wildcard
route. Exposig the segments in a new _splat param would require a
breaking change to the return value of the matchers.

fixes angular#60821
@diicar
Copy link
Contributor

diicar commented Oct 25, 2025

would it work in following scenario ?

 {
   path: '**',
   component: PreviewComponent
 }

then in PreviewComponent

const paths = dynamicPaths(data);
const config = this.activatedRoute.routeConfig!;
config.children = paths;
this.router.resetConfig(this.router.config);

Thanks

@atscott
Copy link
Contributor Author

atscott commented Oct 25, 2025

@diicar No, you cannot have children under wildcard paths. They are terminal and consume all remaining segments

Copy link
Contributor

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

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

LGTM, this is great!!

@atscott atscott added the action: merge The PR is ready for merge by the caretaker label Oct 27, 2025
@crisbeto crisbeto merged commit 0a0cc27 into angular:main Oct 28, 2025
20 checks passed
@crisbeto
Copy link
Member

This PR was merged into the repository. The changes were merged into the following branches:

@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 Nov 28, 2025
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 detected: feature PR contains a feature commit target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

support ** wildcard between path segments (e.g., /foo/**/bar)

4 participants