@angular/router 22.0.0-next.8 → 22.0.0-next.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v22.0.0-next.8
2
+ * @license Angular v22.0.0-next.9
3
3
  * (c) 2010-2026 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
@@ -327,7 +327,7 @@ function mapChildrenIntoArray(segment, fn) {
327
327
  class UrlSerializer {
328
328
  static ɵfac = i0.ɵɵngDeclareFactory({
329
329
  minVersion: "12.0.0",
330
- version: "22.0.0-next.8",
330
+ version: "22.0.0-next.9",
331
331
  ngImport: i0,
332
332
  type: UrlSerializer,
333
333
  deps: [],
@@ -335,7 +335,7 @@ class UrlSerializer {
335
335
  });
336
336
  static ɵprov = i0.ɵɵngDeclareInjectable({
337
337
  minVersion: "12.0.0",
338
- version: "22.0.0-next.8",
338
+ version: "22.0.0-next.9",
339
339
  ngImport: i0,
340
340
  type: UrlSerializer,
341
341
  providedIn: 'root',
@@ -344,7 +344,7 @@ class UrlSerializer {
344
344
  }
345
345
  i0.ɵɵngDeclareClassMetadata({
346
346
  minVersion: "12.0.0",
347
- version: "22.0.0-next.8",
347
+ version: "22.0.0-next.9",
348
348
  ngImport: i0,
349
349
  type: UrlSerializer,
350
350
  decorators: [{
@@ -1301,7 +1301,7 @@ class ChildrenOutletContexts {
1301
1301
  }
1302
1302
  static ɵfac = i0.ɵɵngDeclareFactory({
1303
1303
  minVersion: "12.0.0",
1304
- version: "22.0.0-next.8",
1304
+ version: "22.0.0-next.9",
1305
1305
  ngImport: i0,
1306
1306
  type: ChildrenOutletContexts,
1307
1307
  deps: [{
@@ -1311,7 +1311,7 @@ class ChildrenOutletContexts {
1311
1311
  });
1312
1312
  static ɵprov = i0.ɵɵngDeclareInjectable({
1313
1313
  minVersion: "12.0.0",
1314
- version: "22.0.0-next.8",
1314
+ version: "22.0.0-next.9",
1315
1315
  ngImport: i0,
1316
1316
  type: ChildrenOutletContexts,
1317
1317
  providedIn: 'root'
@@ -1319,7 +1319,7 @@ class ChildrenOutletContexts {
1319
1319
  }
1320
1320
  i0.ɵɵngDeclareClassMetadata({
1321
1321
  minVersion: "12.0.0",
1322
- version: "22.0.0-next.8",
1322
+ version: "22.0.0-next.9",
1323
1323
  ngImport: i0,
1324
1324
  type: ChildrenOutletContexts,
1325
1325
  decorators: [{
@@ -1496,7 +1496,8 @@ class ActivatedRoute {
1496
1496
  return this.snapshot ? this.snapshot.toString() : `Future(${this._futureSnapshot})`;
1497
1497
  }
1498
1498
  }
1499
- function getInherited(route, parent, paramsInheritanceStrategy = 'emptyOnly') {
1499
+ const DEFAULT_PARAMS_INHERITANCE_STRATEGY = 'always';
1500
+ function getInherited(route, parent, paramsInheritanceStrategy) {
1500
1501
  let inherited;
1501
1502
  const {
1502
1503
  routeConfig
@@ -1776,7 +1777,7 @@ class RouterOutlet {
1776
1777
  }
1777
1778
  static ɵfac = i0.ɵɵngDeclareFactory({
1778
1779
  minVersion: "12.0.0",
1779
- version: "22.0.0-next.8",
1780
+ version: "22.0.0-next.9",
1780
1781
  ngImport: i0,
1781
1782
  type: RouterOutlet,
1782
1783
  deps: [],
@@ -1784,7 +1785,7 @@ class RouterOutlet {
1784
1785
  });
1785
1786
  static ɵdir = i0.ɵɵngDeclareDirective({
1786
1787
  minVersion: "17.1.0",
1787
- version: "22.0.0-next.8",
1788
+ version: "22.0.0-next.9",
1788
1789
  type: RouterOutlet,
1789
1790
  isStandalone: true,
1790
1791
  selector: "router-outlet",
@@ -1817,7 +1818,7 @@ class RouterOutlet {
1817
1818
  }
1818
1819
  i0.ɵɵngDeclareClassMetadata({
1819
1820
  minVersion: "12.0.0",
1820
- version: "22.0.0-next.8",
1821
+ version: "22.0.0-next.9",
1821
1822
  ngImport: i0,
1822
1823
  type: RouterOutlet,
1823
1824
  decorators: [{
@@ -1931,7 +1932,7 @@ class RoutedComponentInputBinder {
1931
1932
  }
1932
1933
  static ɵfac = i0.ɵɵngDeclareFactory({
1933
1934
  minVersion: "12.0.0",
1934
- version: "22.0.0-next.8",
1935
+ version: "22.0.0-next.9",
1935
1936
  ngImport: i0,
1936
1937
  type: RoutedComponentInputBinder,
1937
1938
  deps: "invalid",
@@ -1939,14 +1940,14 @@ class RoutedComponentInputBinder {
1939
1940
  });
1940
1941
  static ɵprov = i0.ɵɵngDeclareInjectable({
1941
1942
  minVersion: "12.0.0",
1942
- version: "22.0.0-next.8",
1943
+ version: "22.0.0-next.9",
1943
1944
  ngImport: i0,
1944
1945
  type: RoutedComponentInputBinder
1945
1946
  });
1946
1947
  }
1947
1948
  i0.ɵɵngDeclareClassMetadata({
1948
1949
  minVersion: "12.0.0",
1949
- version: "22.0.0-next.8",
1950
+ version: "22.0.0-next.9",
1950
1951
  ngImport: i0,
1951
1952
  type: RoutedComponentInputBinder,
1952
1953
  decorators: [{
@@ -1960,7 +1961,7 @@ i0.ɵɵngDeclareClassMetadata({
1960
1961
  class ɵEmptyOutletComponent {
1961
1962
  static ɵfac = i0.ɵɵngDeclareFactory({
1962
1963
  minVersion: "12.0.0",
1963
- version: "22.0.0-next.8",
1964
+ version: "22.0.0-next.9",
1964
1965
  ngImport: i0,
1965
1966
  type: ɵEmptyOutletComponent,
1966
1967
  deps: [],
@@ -1968,7 +1969,7 @@ class ɵEmptyOutletComponent {
1968
1969
  });
1969
1970
  static ɵcmp = i0.ɵɵngDeclareComponent({
1970
1971
  minVersion: "14.0.0",
1971
- version: "22.0.0-next.8",
1972
+ version: "22.0.0-next.9",
1972
1973
  type: ɵEmptyOutletComponent,
1973
1974
  isStandalone: true,
1974
1975
  selector: "ng-component",
@@ -1989,7 +1990,7 @@ class ɵEmptyOutletComponent {
1989
1990
  }
1990
1991
  i0.ɵɵngDeclareClassMetadata({
1991
1992
  minVersion: "12.0.0",
1992
- version: "22.0.0-next.8",
1993
+ version: "22.0.0-next.9",
1993
1994
  ngImport: i0,
1994
1995
  type: ɵEmptyOutletComponent,
1995
1996
  decorators: [{
@@ -2900,7 +2901,7 @@ function noLeftoversInUrl(segmentGroup, segments, outlet) {
2900
2901
  }
2901
2902
 
2902
2903
  class NoLeftoversInUrl {}
2903
- async function recognize$1(injector, configLoader, rootComponentType, config, urlTree, urlSerializer, paramsInheritanceStrategy = 'emptyOnly', abortSignal) {
2904
+ async function recognize$1(injector, configLoader, rootComponentType, config, urlTree, urlSerializer, paramsInheritanceStrategy, abortSignal) {
2904
2905
  return new Recognizer(injector, configLoader, rootComponentType, config, urlTree, paramsInheritanceStrategy, urlSerializer, abortSignal).recognize();
2905
2906
  }
2906
2907
  const MAX_ALLOWED_REDIRECTS = 31;
@@ -3300,7 +3301,7 @@ class TitleStrategy {
3300
3301
  }
3301
3302
  static ɵfac = i0.ɵɵngDeclareFactory({
3302
3303
  minVersion: "12.0.0",
3303
- version: "22.0.0-next.8",
3304
+ version: "22.0.0-next.9",
3304
3305
  ngImport: i0,
3305
3306
  type: TitleStrategy,
3306
3307
  deps: [],
@@ -3308,7 +3309,7 @@ class TitleStrategy {
3308
3309
  });
3309
3310
  static ɵprov = i0.ɵɵngDeclareInjectable({
3310
3311
  minVersion: "12.0.0",
3311
- version: "22.0.0-next.8",
3312
+ version: "22.0.0-next.9",
3312
3313
  ngImport: i0,
3313
3314
  type: TitleStrategy,
3314
3315
  providedIn: 'root',
@@ -3317,7 +3318,7 @@ class TitleStrategy {
3317
3318
  }
3318
3319
  i0.ɵɵngDeclareClassMetadata({
3319
3320
  minVersion: "12.0.0",
3320
- version: "22.0.0-next.8",
3321
+ version: "22.0.0-next.9",
3321
3322
  ngImport: i0,
3322
3323
  type: TitleStrategy,
3323
3324
  decorators: [{
@@ -3342,7 +3343,7 @@ class DefaultTitleStrategy extends TitleStrategy {
3342
3343
  }
3343
3344
  static ɵfac = i0.ɵɵngDeclareFactory({
3344
3345
  minVersion: "12.0.0",
3345
- version: "22.0.0-next.8",
3346
+ version: "22.0.0-next.9",
3346
3347
  ngImport: i0,
3347
3348
  type: DefaultTitleStrategy,
3348
3349
  deps: [{
@@ -3352,7 +3353,7 @@ class DefaultTitleStrategy extends TitleStrategy {
3352
3353
  });
3353
3354
  static ɵprov = i0.ɵɵngDeclareInjectable({
3354
3355
  minVersion: "12.0.0",
3355
- version: "22.0.0-next.8",
3356
+ version: "22.0.0-next.9",
3356
3357
  ngImport: i0,
3357
3358
  type: DefaultTitleStrategy,
3358
3359
  providedIn: 'root'
@@ -3360,7 +3361,7 @@ class DefaultTitleStrategy extends TitleStrategy {
3360
3361
  }
3361
3362
  i0.ɵɵngDeclareClassMetadata({
3362
3363
  minVersion: "12.0.0",
3363
- version: "22.0.0-next.8",
3364
+ version: "22.0.0-next.9",
3364
3365
  ngImport: i0,
3365
3366
  type: DefaultTitleStrategy,
3366
3367
  decorators: [{
@@ -3439,7 +3440,7 @@ class RouterConfigLoader {
3439
3440
  }
3440
3441
  static ɵfac = i0.ɵɵngDeclareFactory({
3441
3442
  minVersion: "12.0.0",
3442
- version: "22.0.0-next.8",
3443
+ version: "22.0.0-next.9",
3443
3444
  ngImport: i0,
3444
3445
  type: RouterConfigLoader,
3445
3446
  deps: [],
@@ -3447,7 +3448,7 @@ class RouterConfigLoader {
3447
3448
  });
3448
3449
  static ɵprov = i0.ɵɵngDeclareInjectable({
3449
3450
  minVersion: "12.0.0",
3450
- version: "22.0.0-next.8",
3451
+ version: "22.0.0-next.9",
3451
3452
  ngImport: i0,
3452
3453
  type: RouterConfigLoader,
3453
3454
  providedIn: 'root'
@@ -3455,7 +3456,7 @@ class RouterConfigLoader {
3455
3456
  }
3456
3457
  i0.ɵɵngDeclareClassMetadata({
3457
3458
  minVersion: "12.0.0",
3458
- version: "22.0.0-next.8",
3459
+ version: "22.0.0-next.9",
3459
3460
  ngImport: i0,
3460
3461
  type: RouterConfigLoader,
3461
3462
  decorators: [{
@@ -3520,7 +3521,7 @@ async function maybeResolveResources(value) {
3520
3521
  class UrlHandlingStrategy {
3521
3522
  static ɵfac = i0.ɵɵngDeclareFactory({
3522
3523
  minVersion: "12.0.0",
3523
- version: "22.0.0-next.8",
3524
+ version: "22.0.0-next.9",
3524
3525
  ngImport: i0,
3525
3526
  type: UrlHandlingStrategy,
3526
3527
  deps: [],
@@ -3528,7 +3529,7 @@ class UrlHandlingStrategy {
3528
3529
  });
3529
3530
  static ɵprov = i0.ɵɵngDeclareInjectable({
3530
3531
  minVersion: "12.0.0",
3531
- version: "22.0.0-next.8",
3532
+ version: "22.0.0-next.9",
3532
3533
  ngImport: i0,
3533
3534
  type: UrlHandlingStrategy,
3534
3535
  providedIn: 'root',
@@ -3537,7 +3538,7 @@ class UrlHandlingStrategy {
3537
3538
  }
3538
3539
  i0.ɵɵngDeclareClassMetadata({
3539
3540
  minVersion: "12.0.0",
3540
- version: "22.0.0-next.8",
3541
+ version: "22.0.0-next.9",
3541
3542
  ngImport: i0,
3542
3543
  type: UrlHandlingStrategy,
3543
3544
  decorators: [{
@@ -3560,7 +3561,7 @@ class DefaultUrlHandlingStrategy {
3560
3561
  }
3561
3562
  static ɵfac = i0.ɵɵngDeclareFactory({
3562
3563
  minVersion: "12.0.0",
3563
- version: "22.0.0-next.8",
3564
+ version: "22.0.0-next.9",
3564
3565
  ngImport: i0,
3565
3566
  type: DefaultUrlHandlingStrategy,
3566
3567
  deps: [],
@@ -3568,7 +3569,7 @@ class DefaultUrlHandlingStrategy {
3568
3569
  });
3569
3570
  static ɵprov = i0.ɵɵngDeclareInjectable({
3570
3571
  minVersion: "12.0.0",
3571
- version: "22.0.0-next.8",
3572
+ version: "22.0.0-next.9",
3572
3573
  ngImport: i0,
3573
3574
  type: DefaultUrlHandlingStrategy,
3574
3575
  providedIn: 'root'
@@ -3576,7 +3577,7 @@ class DefaultUrlHandlingStrategy {
3576
3577
  }
3577
3578
  i0.ɵɵngDeclareClassMetadata({
3578
3579
  minVersion: "12.0.0",
3579
- version: "22.0.0-next.8",
3580
+ version: "22.0.0-next.9",
3580
3581
  ngImport: i0,
3581
3582
  type: DefaultUrlHandlingStrategy,
3582
3583
  decorators: [{
@@ -3669,7 +3670,7 @@ class NavigationTransitions {
3669
3670
  options = inject(ROUTER_CONFIGURATION, {
3670
3671
  optional: true
3671
3672
  }) || {};
3672
- paramsInheritanceStrategy = this.options.paramsInheritanceStrategy || 'emptyOnly';
3673
+ paramsInheritanceStrategy = this.options.paramsInheritanceStrategy || DEFAULT_PARAMS_INHERITANCE_STRATEGY;
3673
3674
  urlHandlingStrategy = inject(UrlHandlingStrategy);
3674
3675
  createViewTransition = inject(CREATE_VIEW_TRANSITION, {
3675
3676
  optional: true
@@ -3975,7 +3976,7 @@ class NavigationTransitions {
3975
3976
  }
3976
3977
  static ɵfac = i0.ɵɵngDeclareFactory({
3977
3978
  minVersion: "12.0.0",
3978
- version: "22.0.0-next.8",
3979
+ version: "22.0.0-next.9",
3979
3980
  ngImport: i0,
3980
3981
  type: NavigationTransitions,
3981
3982
  deps: [],
@@ -3983,7 +3984,7 @@ class NavigationTransitions {
3983
3984
  });
3984
3985
  static ɵprov = i0.ɵɵngDeclareInjectable({
3985
3986
  minVersion: "12.0.0",
3986
- version: "22.0.0-next.8",
3987
+ version: "22.0.0-next.9",
3987
3988
  ngImport: i0,
3988
3989
  type: NavigationTransitions,
3989
3990
  providedIn: 'root'
@@ -3991,7 +3992,7 @@ class NavigationTransitions {
3991
3992
  }
3992
3993
  i0.ɵɵngDeclareClassMetadata({
3993
3994
  minVersion: "12.0.0",
3994
- version: "22.0.0-next.8",
3995
+ version: "22.0.0-next.9",
3995
3996
  ngImport: i0,
3996
3997
  type: NavigationTransitions,
3997
3998
  decorators: [{
@@ -4064,7 +4065,7 @@ function destroyDetachedRouteHandle(handle) {
4064
4065
  class RouteReuseStrategy {
4065
4066
  static ɵfac = i0.ɵɵngDeclareFactory({
4066
4067
  minVersion: "12.0.0",
4067
- version: "22.0.0-next.8",
4068
+ version: "22.0.0-next.9",
4068
4069
  ngImport: i0,
4069
4070
  type: RouteReuseStrategy,
4070
4071
  deps: [],
@@ -4072,7 +4073,7 @@ class RouteReuseStrategy {
4072
4073
  });
4073
4074
  static ɵprov = i0.ɵɵngDeclareInjectable({
4074
4075
  minVersion: "12.0.0",
4075
- version: "22.0.0-next.8",
4076
+ version: "22.0.0-next.9",
4076
4077
  ngImport: i0,
4077
4078
  type: RouteReuseStrategy,
4078
4079
  providedIn: 'root',
@@ -4081,7 +4082,7 @@ class RouteReuseStrategy {
4081
4082
  }
4082
4083
  i0.ɵɵngDeclareClassMetadata({
4083
4084
  minVersion: "12.0.0",
4084
- version: "22.0.0-next.8",
4085
+ version: "22.0.0-next.9",
4085
4086
  ngImport: i0,
4086
4087
  type: RouteReuseStrategy,
4087
4088
  decorators: [{
@@ -4113,7 +4114,7 @@ class BaseRouteReuseStrategy {
4113
4114
  class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {
4114
4115
  static ɵfac = i0.ɵɵngDeclareFactory({
4115
4116
  minVersion: "12.0.0",
4116
- version: "22.0.0-next.8",
4117
+ version: "22.0.0-next.9",
4117
4118
  ngImport: i0,
4118
4119
  type: DefaultRouteReuseStrategy,
4119
4120
  deps: null,
@@ -4121,7 +4122,7 @@ class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {
4121
4122
  });
4122
4123
  static ɵprov = i0.ɵɵngDeclareInjectable({
4123
4124
  minVersion: "12.0.0",
4124
- version: "22.0.0-next.8",
4125
+ version: "22.0.0-next.9",
4125
4126
  ngImport: i0,
4126
4127
  type: DefaultRouteReuseStrategy,
4127
4128
  providedIn: 'root'
@@ -4129,7 +4130,7 @@ class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {
4129
4130
  }
4130
4131
  i0.ɵɵngDeclareClassMetadata({
4131
4132
  minVersion: "12.0.0",
4132
- version: "22.0.0-next.8",
4133
+ version: "22.0.0-next.9",
4133
4134
  ngImport: i0,
4134
4135
  type: DefaultRouteReuseStrategy,
4135
4136
  decorators: [{
@@ -4167,6 +4168,14 @@ class StateManager {
4167
4168
  const path = url instanceof UrlTree ? this.urlSerializer.serialize(url) : url;
4168
4169
  return path;
4169
4170
  }
4171
+ routerUrlState(navigation) {
4172
+ if (navigation?.targetBrowserUrl === undefined || navigation?.finalUrl === undefined) {
4173
+ return {};
4174
+ }
4175
+ return {
4176
+ ɵrouterUrl: this.urlSerializer.serialize(navigation.finalUrl)
4177
+ };
4178
+ }
4170
4179
  commitTransition({
4171
4180
  targetRouterState,
4172
4181
  finalUrl,
@@ -4203,7 +4212,7 @@ class StateManager {
4203
4212
  }
4204
4213
  static ɵfac = i0.ɵɵngDeclareFactory({
4205
4214
  minVersion: "12.0.0",
4206
- version: "22.0.0-next.8",
4215
+ version: "22.0.0-next.9",
4207
4216
  ngImport: i0,
4208
4217
  type: StateManager,
4209
4218
  deps: [],
@@ -4211,7 +4220,7 @@ class StateManager {
4211
4220
  });
4212
4221
  static ɵprov = i0.ɵɵngDeclareInjectable({
4213
4222
  minVersion: "12.0.0",
4214
- version: "22.0.0-next.8",
4223
+ version: "22.0.0-next.9",
4215
4224
  ngImport: i0,
4216
4225
  type: StateManager,
4217
4226
  providedIn: 'root',
@@ -4220,7 +4229,7 @@ class StateManager {
4220
4229
  }
4221
4230
  i0.ɵɵngDeclareClassMetadata({
4222
4231
  minVersion: "12.0.0",
4223
- version: "22.0.0-next.8",
4232
+ version: "22.0.0-next.9",
4224
4233
  ngImport: i0,
4225
4234
  type: StateManager,
4226
4235
  decorators: [{
@@ -4276,10 +4285,11 @@ class HistoryStateManager extends StateManager {
4276
4285
  this.currentPageId = this.browserPageId;
4277
4286
  }
4278
4287
  }
4279
- setBrowserUrl(path, {
4280
- extras,
4281
- id
4282
- }) {
4288
+ setBrowserUrl(path, navigation) {
4289
+ const {
4290
+ extras,
4291
+ id
4292
+ } = navigation;
4283
4293
  const {
4284
4294
  replaceUrl,
4285
4295
  state
@@ -4288,13 +4298,13 @@ class HistoryStateManager extends StateManager {
4288
4298
  const currentBrowserPageId = this.browserPageId;
4289
4299
  const newState = {
4290
4300
  ...state,
4291
- ...this.generateNgRouterState(id, currentBrowserPageId)
4301
+ ...this.generateNgRouterState(id, currentBrowserPageId, navigation)
4292
4302
  };
4293
4303
  this.location.replaceState(path, '', newState);
4294
4304
  } else {
4295
4305
  const newState = {
4296
4306
  ...state,
4297
- ...this.generateNgRouterState(id, this.browserPageId + 1)
4307
+ ...this.generateNgRouterState(id, this.browserPageId + 1, navigation)
4298
4308
  };
4299
4309
  this.location.go(path, '', newState);
4300
4310
  }
@@ -4326,20 +4336,22 @@ class HistoryStateManager extends StateManager {
4326
4336
  resetUrlToCurrentUrlTree() {
4327
4337
  this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()), '', this.generateNgRouterState(this.lastSuccessfulId, this.currentPageId));
4328
4338
  }
4329
- generateNgRouterState(navigationId, routerPageId) {
4339
+ generateNgRouterState(navigationId, routerPageId, navigation) {
4330
4340
  if (this.canceledNavigationResolution === 'computed') {
4331
4341
  return {
4332
4342
  navigationId,
4333
- ɵrouterPageId: routerPageId
4343
+ ɵrouterPageId: routerPageId,
4344
+ ...this.routerUrlState(navigation)
4334
4345
  };
4335
4346
  }
4336
4347
  return {
4337
- navigationId
4348
+ navigationId,
4349
+ ...this.routerUrlState(navigation)
4338
4350
  };
4339
4351
  }
4340
4352
  static ɵfac = i0.ɵɵngDeclareFactory({
4341
4353
  minVersion: "12.0.0",
4342
- version: "22.0.0-next.8",
4354
+ version: "22.0.0-next.9",
4343
4355
  ngImport: i0,
4344
4356
  type: HistoryStateManager,
4345
4357
  deps: null,
@@ -4347,7 +4359,7 @@ class HistoryStateManager extends StateManager {
4347
4359
  });
4348
4360
  static ɵprov = i0.ɵɵngDeclareInjectable({
4349
4361
  minVersion: "12.0.0",
4350
- version: "22.0.0-next.8",
4362
+ version: "22.0.0-next.9",
4351
4363
  ngImport: i0,
4352
4364
  type: HistoryStateManager,
4353
4365
  providedIn: 'root'
@@ -4355,7 +4367,7 @@ class HistoryStateManager extends StateManager {
4355
4367
  }
4356
4368
  i0.ɵɵngDeclareClassMetadata({
4357
4369
  minVersion: "12.0.0",
4358
- version: "22.0.0-next.8",
4370
+ version: "22.0.0-next.9",
4359
4371
  ngImport: i0,
4360
4372
  type: HistoryStateManager,
4361
4373
  decorators: [{
@@ -4485,17 +4497,25 @@ class Router {
4485
4497
  }
4486
4498
  navigateToSyncWithBrowser(url, source, state, extras) {
4487
4499
  const restoredState = state?.navigationId ? state : null;
4500
+ const routerUrl = state?.ɵrouterUrl ?? url;
4501
+ if (state?.ɵrouterUrl) {
4502
+ extras = {
4503
+ ...extras,
4504
+ browserUrl: url
4505
+ };
4506
+ }
4488
4507
  if (state) {
4489
4508
  const stateCopy = {
4490
4509
  ...state
4491
4510
  };
4492
4511
  delete stateCopy.navigationId;
4493
4512
  delete stateCopy.ɵrouterPageId;
4513
+ delete stateCopy.ɵrouterUrl;
4494
4514
  if (Object.keys(stateCopy).length !== 0) {
4495
4515
  extras.state = stateCopy;
4496
4516
  }
4497
4517
  }
4498
- const urlTree = this.parseUrl(url);
4518
+ const urlTree = this.parseUrl(routerUrl);
4499
4519
  this.scheduleNavigation(urlTree, source, restoredState, extras).catch(e => {
4500
4520
  if (this.disposed) {
4501
4521
  return;
@@ -4658,7 +4678,7 @@ class Router {
4658
4678
  }
4659
4679
  static ɵfac = i0.ɵɵngDeclareFactory({
4660
4680
  minVersion: "12.0.0",
4661
- version: "22.0.0-next.8",
4681
+ version: "22.0.0-next.9",
4662
4682
  ngImport: i0,
4663
4683
  type: Router,
4664
4684
  deps: [],
@@ -4666,7 +4686,7 @@ class Router {
4666
4686
  });
4667
4687
  static ɵprov = i0.ɵɵngDeclareInjectable({
4668
4688
  minVersion: "12.0.0",
4669
- version: "22.0.0-next.8",
4689
+ version: "22.0.0-next.9",
4670
4690
  ngImport: i0,
4671
4691
  type: Router,
4672
4692
  providedIn: 'root'
@@ -4674,7 +4694,7 @@ class Router {
4674
4694
  }
4675
4695
  i0.ɵɵngDeclareClassMetadata({
4676
4696
  minVersion: "12.0.0",
4677
- version: "22.0.0-next.8",
4697
+ version: "22.0.0-next.9",
4678
4698
  ngImport: i0,
4679
4699
  type: Router,
4680
4700
  decorators: [{