-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Commit a4e415e
committed
fix(@angular/ssr): support
Handle `getPrerenderParams` return values when used with wildcard route paths, including support for combined routes like `/product/:id/**`.
Supports returning an array of path segments (e.g., `['category', '123']`) for `**` routes and dynamic segments combined with catch-all routes.
This enables more flexible prerendering configurations in server routes, including handling specific paths such as `/product/1/laptop/123`.
Example:
```ts
{
path: '/product/:id/**',
renderMode: RenderMode.Prerender,
async getPrerenderParams() {
return [
{ id: '1', '**': 'laptop/123' },
{ id: '2', '**': 'laptop/456' }
];
}
}
```
Closes #30035
(cherry picked from commit cb3446e)getPrerenderParams
for wildcard routes1 parent de52cc2 commit a4e415e
File tree
3 files changed
+103
-41
lines changed- packages/angular/ssr
- src/routes
- test/routes
3 files changed
+103
-41
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
46 | 46 |
| |
47 | 47 |
| |
48 | 48 |
| |
49 | + | ||
50 | + | ||
51 | + | ||
52 | + | ||
53 | + | ||
54 | + | ||
49 | 55 |
| |
50 | 56 |
| |
51 | 57 |
| |
| |||
391 | 397 |
| |
392 | 398 |
| |
393 | 399 |
| |
394 | - | ||
400 | + | ||
401 | + | ||
402 | + | ||
403 | + | ||
404 | + | ||
395 | 405 |
| |
396 | 406 |
| |
397 | 407 |
| |
| |||
415 | 425 |
| |
416 | 426 |
| |
417 | 427 |
| |
418 | - | ||
428 | + | ||
429 | + | ||
430 | + | ||
419 | 431 |
| |
420 | 432 |
| |
421 | 433 |
| |
| |||
429 | 441 |
| |
430 | 442 |
| |
431 | 443 |
| |
432 | - | ||
433 | - | ||
434 | - | ||
435 | - | ||
436 | - | ||
437 | - | ||
438 | - | ||
439 | - | ||
440 | - | ||
441 | - | ||
442 | - | ||
443 | - | ||
444 | - | ||
445 | - | ||
444 | + | ||
445 | + | ||
446 | + | ||
447 | + | ||
446 | 448 |
| |
447 | 449 |
| |
448 | 450 |
| |
| |||
473 | 475 |
| |
474 | 476 |
| |
475 | 477 |
| |
478 | + | ||
479 | + | ||
480 | + | ||
481 | + | ||
482 | + | ||
483 | + | ||
484 | + | ||
485 | + | ||
486 | + | ||
487 | + | ||
488 | + | ||
489 | + | ||
490 | + | ||
491 | + | ||
492 | + | ||
493 | + | ||
494 | + | ||
495 | + | ||
496 | + | ||
497 | + | ||
498 | + | ||
499 | + | ||
500 | + | ||
501 | + | ||
502 | + | ||
503 | + | ||
504 | + | ||
505 | + | ||
476 | 506 |
| |
477 | 507 |
| |
478 | 508 |
| |
| |||
530 | 560 |
| |
531 | 561 |
| |
532 | 562 |
| |
533 | - | ||
563 | + | ||
534 | 564 |
| |
535 | - | ||
565 | + | ||
536 | 566 |
| |
537 | 567 |
| |
538 | 568 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
146 | 146 |
| |
147 | 147 |
| |
148 | 148 |
| |
149 | + | ||
150 | + | ||
151 | + | ||
152 | + | ||
149 | 153 |
| |
150 | 154 |
| |
151 | 155 |
| |
| |||
159 | 163 |
| |
160 | 164 |
| |
161 | 165 |
| |
162 | - | ||
166 | + | ||
167 | + | ||
168 | + | ||
169 | + | ||
170 | + | ||
171 | + | ||
172 | + | ||
173 | + | ||
174 | + | ||
175 | + | ||
176 | + | ||
163 | 177 |
| |
164 | 178 |
| |
165 | 179 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
68 | 68 |
| |
69 | 69 |
| |
70 | 70 |
| |
71 | - | ||
72 | - | ||
73 | - | ||
74 | - | ||
75 | - | ||
76 | - | ||
77 | - | ||
78 | - | ||
79 | - | ||
80 | - | ||
81 | - | ||
82 | - | ||
83 | - | ||
84 | - | ||
85 | - | ||
86 | - | ||
87 | - | ||
88 | - | ||
89 | - | ||
90 | - | ||
91 | 71 |
| |
92 | 72 |
| |
93 | 73 |
| |
| |||
104 | 84 |
| |
105 | 85 |
| |
106 | 86 |
| |
107 | - | ||
87 | + | ||
108 | 88 |
| |
109 | 89 |
| |
110 | 90 |
| |
| |||
259 | 239 |
| |
260 | 240 |
| |
261 | 241 |
| |
262 | - | ||
242 | + | ||
263 | 243 |
| |
264 | 244 |
| |
265 | 245 |
| |
| |||
296 | 276 |
| |
297 | 277 |
| |
298 | 278 |
| |
279 | + | ||
280 | + | ||
281 | + | ||
282 | + | ||
283 | + | ||
284 | + | ||
285 | + | ||
286 | + | ||
287 | + | ||
288 | + | ||
289 | + | ||
290 | + | ||
291 | + | ||
292 | + | ||
293 | + | ||
294 | + | ||
295 | + | ||
296 | + | ||
297 | + | ||
298 | + | ||
299 | + | ||
300 | + | ||
301 | + | ||
302 | + | ||
303 | + | ||
304 | + | ||
305 | + | ||
306 | + | ||
307 | + | ||
308 | + | ||
309 | + | ||
310 | + | ||
311 | + | ||
312 | + | ||
313 | + | ||
314 | + | ||
315 | + | ||
316 | + | ||
299 | 317 |
| |
300 | 318 |
| |
301 | 319 |
| |
|
0 commit comments