refactor(@angular/ssr): combine redirect URL parameter helpers and use DefaultUrlSerializer #34467

Merged
alan-agius4 opened 10:38am on October 21, 2026 wanted to merge 52 Ξ” into angular/angular-cli main from
refactor/ssr-redirect-params
Diff Delta:
52
About 26 Diff Delta/hour
Classified as:  General

alan-agius4's Description of Work

Follow-up to #34321:
- Combines buildPathWithParams and buildQueryWithParams into buildUrlWithParams.
- Reuses DefaultUrlSerializer from @angular/router for query parameter parsing and serialization instead of custom regex/encoding helpers.
- Adds fast-path checks to avoid regex/splitting and URLSearchParams instantiation when redirect targets do not contain placeholders.
- Applies joinUrlParts only to the path portion of redirect targets when prepending baseHref or X-Forwarded-Prefix so trailing slashes in query parameters or fragments are preserved.

4 total changed files
Loading changes...
Loading changes...
Loading changes...
Congrats, you've cleared the final file
Your attention span may now revert to "default human"