-
Notifications
You must be signed in to change notification settings - Fork 11.9k
fix(@angular/ssr): correctly handle auxiliary routes #31959
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
Conversation
This commit updates Angular SSR URL preprocessing to remove auxiliary outlet route segments before route matching. Previously, URLs containing auxiliary routes appended with outlet syntax, such as `/path(foo:bar)`, could prevent correct route resolution. A new `stripAuxiliaryRoutes` utility function has been added to strip these segments, ensuring that SSR route matching behaves consistently with client-side routing. This issue is similar to angular#31457, and the fix is based from angular#31476
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
@JustroX, the 3rd commit starts with a double |
638d745 to
db2543a
Compare
My bad. tried to fix it. Thanks @alan-agius4 |
|
Hello @JustroX, I had a quick convo with @atscott regarding auxiliary routes. He correctly mentioned that they can be positioned mid-path in the URL. He also pointed out, that aux routes adds a lot of complexity to the URL and hence we decided that at this point we do not want to support them with SSR. Thanks for your contribution. |
|
Thanks for the review and the context. Fully understand the direction :) Happy to revisit this in the future if needed. |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This commit updates Angular SSR URL preprocessing to remove auxiliary outlet route segments before route matching. Previously, URLs containing auxiliary routes appended with outlet syntax, such as
/path(foo:bar), could prevent correct route resolution.A new
stripAuxiliaryRoutesutility function has been added to strip these segments, ensuring that SSR route matching behaves consistently with client-side routing.This issue is similar to #31457, and the fix is based from #31476
PR Checklist
Please check to confirm your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Similar to #31457, Angular SSR seems not to accept URLs with auxiliary routes.
For example:
Running:
Reproduction: https://stackblitz.com/edit/angular-ssr-matrix-params-denial-vly6p1dh?file=src%2Fapp%2Fapp-routes.ts
What is the new behavior?
The routes resolved correctly
Does this PR introduce a breaking change?
Other information
none