fix(router): update URL after redirects when urlHandlingStrategy='eager' (#27356)
fixes #27076 PR Close #27356
This commit is contained in:
@ -389,9 +389,6 @@ export class Router {
|
||||
|
||||
if (processCurrentUrl) {
|
||||
return of (t).pipe(
|
||||
// Update URL if in `eager` update mode
|
||||
tap(t => this.urlUpdateStrategy === 'eager' && !t.extras.skipLocationChange &&
|
||||
this.setBrowserUrl(t.rawUrl, !!t.extras.replaceUrl, t.id)),
|
||||
// Fire NavigationStart event
|
||||
switchMap(t => {
|
||||
const transition = this.transitions.getValue();
|
||||
@ -416,6 +413,10 @@ export class Router {
|
||||
this.rootComponentType, this.config, (url) => this.serializeUrl(url),
|
||||
this.paramsInheritanceStrategy, this.relativeLinkResolution),
|
||||
|
||||
// Update URL if in `eager` update mode
|
||||
tap(t => this.urlUpdateStrategy === 'eager' && !t.extras.skipLocationChange &&
|
||||
this.setBrowserUrl(t.urlAfterRedirects, !!t.extras.replaceUrl, t.id)),
|
||||
|
||||
// Fire RoutesRecognized
|
||||
tap(t => {
|
||||
const routesRecognized = new RoutesRecognized(
|
||||
|
Reference in New Issue
Block a user