Angular Routing Series: Router States and Url Matching

Angular Routing Series: Router States and Url Matching

Whenever the URL changes, the router will try to match it against routes in the ROUTES array. The first thing the router does is apply any redirects defined for each segment of the URL.

[…]

Internally, the router uses a function called applyRedirects to process redirects:

[…]

Once a redirect is applied, a new UrlTree is generated to match against the router config.

[…]