Skip to content
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

ssr does not render routes with custom matcher #29284

Open
dklmuc opened this issue Jan 8, 2025 · 2 comments
Open

ssr does not render routes with custom matcher #29284

dklmuc opened this issue Jan 8, 2025 · 2 comments
Labels
area: @angular/ssr feature: votes required Feature request which is currently still in the voting phase feature Issue that requests a new feature

Comments

@dklmuc
Copy link

dklmuc commented Jan 8, 2025

Which @angular/* package(s) are the source of the bug?

Don't known / other

Is this a regression?

Yes

Description

The new SSR implementation does not seem to work with custom route matcher.

The simple reproduction in linked repo is set to render all routes server side and contains two routes (one by path, one by custom matcher). When serving the app it shows the problem.

Please provide a link to a minimal reproduction of the bug

https://github.com/dklmuc/angular-ssr

Please provide the exception or error you saw

The defined route by path (/path) is rendered as expected but the one defined with a custom matcher (/matcher) is not rendered at all and results in a 404 Cannot GET /matcher.

Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 19.0.6
Node: 18.20.5
Package Manager: npm 10.8.2
OS: linux x64

Angular: 19.0.5
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1900.6
@angular-devkit/build-angular   19.0.6
@angular-devkit/core            19.0.6
@angular-devkit/schematics      19.0.6
@angular/cli                    19.0.6
@angular/ssr                    19.0.6
@schematics/angular             19.0.6
rxjs                            7.8.1
typescript                      5.6.3
zone.js                         0.15.0

Anything else?

Same problem after building the app and starting the bundle.

@alan-agius4 alan-agius4 transferred this issue from angular/angular Jan 8, 2025
@alan-agius4
Copy link
Collaborator

Supporting this could be challenging because routes need to be statically available, and the route tree must be serializable – something that isn't possible with a function.

We previously discussed adding more constraints when using SSR, and this might need to be one of them. For now, I'll give it some more thought to see if there's a workable solution.

@alan-agius4 alan-agius4 added type: bug/fix freq1: low Only reported by a handful of users who observe it rarely severity3: broken feature Issue that requests a new feature and removed type: bug/fix freq1: low Only reported by a handful of users who observe it rarely severity3: broken labels Jan 8, 2025
@angular-robot angular-robot bot added the feature: votes required Feature request which is currently still in the voting phase label Jan 9, 2025
Copy link
Contributor

angular-robot bot commented Jan 9, 2025

This feature request is now candidate for our backlog! In the next phase, the community has 60 days to upvote. If the request receives more than 20 upvotes, we'll move it to our consideration list.

You can find more details about the feature request process in our documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: @angular/ssr feature: votes required Feature request which is currently still in the voting phase feature Issue that requests a new feature
Projects
None yet
Development

No branches or pull requests

2 participants