-
Notifications
You must be signed in to change notification settings - Fork 12k
Routes beginning with Dynamic Parameters break Angular Prerendering and SSR #29452
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
Labels
area: @angular/ssr
freq1: low
Only reported by a handful of users who observe it rarely
severity3: broken
type: bug/fix
Comments
alan-agius4
added a commit
to alan-agius4/angular-cli
that referenced
this issue
Jan 23, 2025
…nce and accuracy Updated route matching logic to prioritize closest matches, improving the accuracy of dynamic route resolution. Also we optimized performance by eliminating unnecessary recursive checks, reducing overhead during route matching. Closes angular#29452
alan-agius4
added a commit
to alan-agius4/angular-cli
that referenced
this issue
Jan 23, 2025
…nce and accuracy Updated route matching logic to prioritize closest matches, improving the accuracy of dynamic route resolution. Also we optimized performance by eliminating unnecessary recursive checks, reducing overhead during route matching. Closes angular#29452
alan-agius4
added a commit
to alan-agius4/angular-cli
that referenced
this issue
Jan 23, 2025
…nce and accuracy Updated route matching logic to prioritize closest matches, improving the accuracy of dynamic route resolution. Also we optimized performance by eliminating unnecessary recursive checks, reducing overhead during route matching. Closes angular#29452
alan-agius4
added a commit
to alan-agius4/angular-cli
that referenced
this issue
Jan 23, 2025
…nce and accuracy Updated route matching logic to prioritize closest matches, improving the accuracy of dynamic route resolution. Also we optimized performance by eliminating unnecessary recursive checks, reducing overhead during route matching. Closes angular#29452
alan-agius4
added a commit
to alan-agius4/angular-cli
that referenced
this issue
Jan 23, 2025
…nce and accuracy Updated route matching logic to prioritize closest matches, improving the accuracy of dynamic route resolution. Also we optimized performance by eliminating unnecessary recursive checks, reducing overhead during route matching. Closes angular#29452
alan-agius4
added a commit
to alan-agius4/angular-cli
that referenced
this issue
Jan 23, 2025
…nce and accuracy Updated route matching logic to prioritize closest matches, improving the accuracy of dynamic route resolution. Also we optimized performance by eliminating unnecessary recursive checks, reducing overhead during route matching. Closes angular#29452
alan-agius4
added a commit
to alan-agius4/angular-cli
that referenced
this issue
Jan 23, 2025
…nce and accuracy Updated route matching logic to prioritize closest matches, improving the accuracy of dynamic route resolution. Also we optimized performance by eliminating unnecessary recursive checks, reducing overhead during route matching. Closes angular#29452
alan-agius4
added a commit
to alan-agius4/angular-cli
that referenced
this issue
Jan 23, 2025
…nce and accuracy Updated route matching logic to prioritize closest matches, improving the accuracy of dynamic route resolution. Also we optimized performance by eliminating unnecessary recursive checks, reducing overhead during route matching. Closes angular#29452
alan-agius4
added a commit
to alan-agius4/angular-cli
that referenced
this issue
Jan 23, 2025
…nce and accuracy Updated route matching logic to prioritize closest matches, improving the accuracy of dynamic route resolution. Also we optimized performance by eliminating unnecessary recursive checks, reducing overhead during route matching. Closes angular#29452
alan-agius4
added a commit
to alan-agius4/angular-cli
that referenced
this issue
Jan 23, 2025
…nce and accuracy Updated route matching logic to prioritize closest matches, improving the accuracy of dynamic route resolution. Also we optimized performance by eliminating unnecessary recursive checks, reducing overhead during route matching. Closes angular#29452
alan-agius4
added a commit
to alan-agius4/angular-cli
that referenced
this issue
Jan 23, 2025
…nce and accuracy Updated route matching logic to prioritize closest matches, improving the accuracy of dynamic route resolution. Also we optimized performance by eliminating unnecessary recursive checks, reducing overhead during route matching. Closes angular#29452
alan-agius4
added a commit
to alan-agius4/angular-cli
that referenced
this issue
Jan 24, 2025
…nce and accuracy Updated route matching logic to prioritize closest matches, improving the accuracy of dynamic route resolution. Also we optimized performance by eliminating unnecessary recursive checks, reducing overhead during route matching. Closes angular#29452
alan-agius4
added a commit
that referenced
this issue
Jan 24, 2025
…nce and accuracy Updated route matching logic to prioritize closest matches, improving the accuracy of dynamic route resolution. Also we optimized performance by eliminating unnecessary recursive checks, reducing overhead during route matching. Closes #29452
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
area: @angular/ssr
freq1: low
Only reported by a handful of users who observe it rarely
severity3: broken
type: bug/fix
Command
build, serve
Is this a regression?
The previous version in which this bug was not present was
No response
Description
Angular provides examples on how to use prerendering for parametrized routes like
post/:id
. However, in our project, we have routes with dynamic parameters at the beginning of the route path, such as:seoAlias/:category/:offerId
.This specific route structure causes issues in
Client
,Server
, andPrerender
modes, breaking other routes when serving the app in development mode or building the application.Minimal Reproduction
We have created a simple reproduction repository:
https://github.com/robertsine/car-shop
Inside the file
app.routes.server.ts
there are several route variants. By uncommenting them, you can reproduce the issue. Notably, onlyoffers/:slug
works well. Other server routes are breaking entire app, when serving app in dev mode or serving build.We tried to use the
**
path as a hack to prerender our parameterized routes. However, in development mode, it does not work. In build mode, it creates prerendered pages. For note, we must ensure unique parameters across the entire route configuration to avoid hitting several paths with same parameter name. However, it generates fallback content inside the index files.Exception or Error
Your Environment
Anything else relevant?
No response
The text was updated successfully, but these errors were encountered: