Skip to content

Conversation

@atscott
Copy link
Contributor

@atscott atscott commented Oct 28, 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

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
@atscott atscott added requires: TGP This PR requires a passing TGP before merging is allowed target: minor This PR is targeted for the next minor release and removed state: blocked labels Oct 28, 2025
@atscott atscott marked this pull request as ready for review October 29, 2025 16:12
@pullapprove pullapprove bot removed the requires: TGP This PR requires a passing TGP before merging is allowed label Oct 29, 2025
@atscott
Copy link
Contributor Author

atscott commented Oct 29, 2025

@atscott atscott added the target: feature This PR is targeted for a feature branch (outside of main and semver branches) label Oct 29, 2025
@atscott atscott added action: merge The PR is ready for merge by the caretaker target: minor This PR is targeted for the next minor release and removed target: minor This PR is targeted for the next minor release target: feature This PR is targeted for a feature branch (outside of main and semver branches) labels Oct 29, 2025
@atscott
Copy link
Contributor Author

atscott commented Oct 30, 2025

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

@atscott atscott closed this in c84d372 Oct 30, 2025
Comment on lines +617 to +620
{
path: '**/b',
component: ComponentB,
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @atscott . Thank you for supporting more sophisticated wildcard route paths, so that we don't need to build custom UrlMatchers in such cases (that are tricky to write and test).

FYI In our Spartacus library in the past we've built custom "suffix url matchers", e.g. to match a pattern like **/p/:productCode.

So let me ask a question for our usecase: Is this PR supporting also dynamic params (:param) as the URL segments? I'm asking, as I'm having problem to find unit tests for this case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, this only supports static suffixes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was wrong. I hadn't specifically intended to support the path params after the wildcard, but it does work since the matchParts function is shared for all the matching and includes the logic for parameters. I'll add some tests for this case.

atscott added a commit to atscott/angular that referenced this pull request Dec 1, 2025
…dcard

This adds additional tests following the initial implementation in angular#64737 that cover
the use-case of path parameters before and after the wildcard segment.
pkozlowski-opensource pushed a commit that referenced this pull request Dec 2, 2025
…dcard

This adds additional tests following the initial implementation in #64737 that cover
the use-case of path parameters before and after the wildcard segment.
@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 Jan 1, 2026
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 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)

3 participants