Closed as not planned
Closed as not planned
Description
Command
build
Description
Based on the feedback in this link #28346, Angular v19
will provide a much better and easier way to handle the prerendering when it comes to the routes that starts with "id"
. But this version will not be released until Nov 19th or so.
Using the below section in the angular.json
file:
"prerender": {
"routesFile": "routes.txt",
"discoverRoutes": false
},
"ssr": {
"entry": "server.ts"
}
In Angular v18.x
, it is is really easy to get prerendered for such basic routes as below:
/auth
/contact
/info/:id
However, is there a way to prerender when the "id" is right at the beginning of the route? For example:
/:userId/profile
/:userId/home
/:userId/account
This is a unique request to prerender that I have not found any solution to on search engines.
Describe the solution you'd like
While waiting for Angular v19
to be released, it would be nice to be able to prerender in v18.x
via the routesFile
routes.txt
for the example routes below:
/:userId/profile
/:userId/home
/:userId/account
Describe alternatives you've considered
No response