@angular/router 15.0.0-rc.4 → 15.0.1

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.
Files changed (38) hide show
  1. package/esm2020/src/components/empty_outlet.mjs +3 -3
  2. package/esm2020/src/directives/router_link.mjs +3 -3
  3. package/esm2020/src/directives/router_link_active.mjs +3 -3
  4. package/esm2020/src/directives/router_outlet.mjs +5 -5
  5. package/esm2020/src/index.mjs +1 -1
  6. package/esm2020/src/models.mjs +1 -1
  7. package/esm2020/src/navigation_transition.mjs +320 -0
  8. package/esm2020/src/operators/activate_routes.mjs +1 -1
  9. package/esm2020/src/operators/apply_redirects.mjs +1 -1
  10. package/esm2020/src/operators/check_guards.mjs +1 -1
  11. package/esm2020/src/operators/recognize.mjs +1 -1
  12. package/esm2020/src/operators/resolve_data.mjs +1 -1
  13. package/esm2020/src/page_title_strategy.mjs +6 -6
  14. package/esm2020/src/private_export.mjs +1 -1
  15. package/esm2020/src/provide_router.mjs +6 -13
  16. package/esm2020/src/route_reuse_strategy.mjs +15 -1
  17. package/esm2020/src/router.mjs +66 -347
  18. package/esm2020/src/router_config_loader.mjs +3 -3
  19. package/esm2020/src/router_module.mjs +4 -4
  20. package/esm2020/src/router_outlet_context.mjs +3 -3
  21. package/esm2020/src/router_preloader.mjs +9 -9
  22. package/esm2020/src/router_scroller.mjs +3 -3
  23. package/esm2020/src/url_handling_strategy.mjs +15 -1
  24. package/esm2020/src/url_tree.mjs +3 -3
  25. package/esm2020/src/version.mjs +1 -1
  26. package/esm2020/testing/src/router_testing_module.mjs +4 -4
  27. package/fesm2015/router.mjs +448 -402
  28. package/fesm2015/router.mjs.map +1 -1
  29. package/fesm2015/testing.mjs +5 -5
  30. package/fesm2015/upgrade.mjs +1 -1
  31. package/fesm2020/router.mjs +462 -411
  32. package/fesm2020/router.mjs.map +1 -1
  33. package/fesm2020/testing.mjs +5 -5
  34. package/fesm2020/upgrade.mjs +1 -1
  35. package/index.d.ts +17 -60
  36. package/package.json +4 -4
  37. package/testing/index.d.ts +1 -1
  38. package/upgrade/index.d.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v15.0.0-rc.4
2
+ * @license Angular v15.0.1
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -202,7 +202,7 @@ function wrapIntoObservable(value) {
202
202
  * Use of this source code is governed by an MIT-style license that can be
203
203
  * found in the LICENSE file at https://angular.io/license
204
204
  */
205
- const NG_DEV_MODE$9 = typeof ngDevMode === 'undefined' || ngDevMode;
205
+ const NG_DEV_MODE$a = typeof ngDevMode === 'undefined' || ngDevMode;
206
206
  const pathCompareMap = {
207
207
  'exact': equalSegmentGroups,
208
208
  'subset': containsSegmentGroup,
@@ -327,7 +327,7 @@ class UrlTree {
327
327
  this.root = root;
328
328
  this.queryParams = queryParams;
329
329
  this.fragment = fragment;
330
- if (NG_DEV_MODE$9) {
330
+ if (NG_DEV_MODE$a) {
331
331
  if (root.segments.length > 0) {
332
332
  throw new ɵRuntimeError(4015 /* RuntimeErrorCode.INVALID_ROOT_URL_SEGMENT */, 'The root `UrlSegmentGroup` should not contain `segments`. ' +
333
333
  'Instead, these segments belong in the `children` so they can be associated with a named outlet.');
@@ -461,9 +461,9 @@ function mapChildrenIntoArray(segment, fn) {
461
461
  */
462
462
  class UrlSerializer {
463
463
  }
464
- UrlSerializer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: UrlSerializer, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
465
- UrlSerializer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: UrlSerializer, providedIn: 'root', useFactory: () => new DefaultUrlSerializer() });
466
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: UrlSerializer, decorators: [{
464
+ UrlSerializer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: UrlSerializer, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
465
+ UrlSerializer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: UrlSerializer, providedIn: 'root', useFactory: () => new DefaultUrlSerializer() });
466
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: UrlSerializer, decorators: [{
467
467
  type: Injectable,
468
468
  args: [{ providedIn: 'root', useFactory: () => new DefaultUrlSerializer() }]
469
469
  }] });
@@ -675,7 +675,7 @@ class UrlParser {
675
675
  parseSegment() {
676
676
  const path = matchSegments(this.remaining);
677
677
  if (path === '' && this.peekStartsWith(';')) {
678
- throw new ɵRuntimeError(4009 /* RuntimeErrorCode.EMPTY_PATH_WITH_PARAMS */, NG_DEV_MODE$9 && `Empty path url segment cannot have parameters: '${this.remaining}'.`);
678
+ throw new ɵRuntimeError(4009 /* RuntimeErrorCode.EMPTY_PATH_WITH_PARAMS */, NG_DEV_MODE$a && `Empty path url segment cannot have parameters: '${this.remaining}'.`);
679
679
  }
680
680
  this.capture(path);
681
681
  return new UrlSegment(decode(path), this.parseMatrixParams());
@@ -744,7 +744,7 @@ class UrlParser {
744
744
  // if is is not one of these characters, then the segment was unescaped
745
745
  // or the group was not closed
746
746
  if (next !== '/' && next !== ')' && next !== ';') {
747
- throw new ɵRuntimeError(4010 /* RuntimeErrorCode.UNPARSABLE_URL */, NG_DEV_MODE$9 && `Cannot parse url '${this.url}'`);
747
+ throw new ɵRuntimeError(4010 /* RuntimeErrorCode.UNPARSABLE_URL */, NG_DEV_MODE$a && `Cannot parse url '${this.url}'`);
748
748
  }
749
749
  let outletName = undefined;
750
750
  if (path.indexOf(':') > -1) {
@@ -775,7 +775,7 @@ class UrlParser {
775
775
  }
776
776
  capture(str) {
777
777
  if (!this.consumeOptional(str)) {
778
- throw new ɵRuntimeError(4011 /* RuntimeErrorCode.UNEXPECTED_VALUE_IN_URL */, NG_DEV_MODE$9 && `Expected "${str}".`);
778
+ throw new ɵRuntimeError(4011 /* RuntimeErrorCode.UNEXPECTED_VALUE_IN_URL */, NG_DEV_MODE$a && `Expected "${str}".`);
779
779
  }
780
780
  }
781
781
  }
@@ -828,7 +828,7 @@ function isUrlTree(v) {
828
828
  * Use of this source code is governed by an MIT-style license that can be
829
829
  * found in the LICENSE file at https://angular.io/license
830
830
  */
831
- const NG_DEV_MODE$8 = typeof ngDevMode === 'undefined' || ngDevMode;
831
+ const NG_DEV_MODE$9 = typeof ngDevMode === 'undefined' || ngDevMode;
832
832
  /**
833
833
  * Creates a `UrlTree` relative to an `ActivatedRouteSnapshot`.
834
834
  *
@@ -999,11 +999,11 @@ class Navigation {
999
999
  this.numberOfDoubleDots = numberOfDoubleDots;
1000
1000
  this.commands = commands;
1001
1001
  if (isAbsolute && commands.length > 0 && isMatrixParams(commands[0])) {
1002
- throw new ɵRuntimeError(4003 /* RuntimeErrorCode.ROOT_SEGMENT_MATRIX_PARAMS */, NG_DEV_MODE$8 && 'Root segment cannot have matrix parameters');
1002
+ throw new ɵRuntimeError(4003 /* RuntimeErrorCode.ROOT_SEGMENT_MATRIX_PARAMS */, NG_DEV_MODE$9 && 'Root segment cannot have matrix parameters');
1003
1003
  }
1004
1004
  const cmdWithOutlet = commands.find(isCommandWithOutlets);
1005
1005
  if (cmdWithOutlet && cmdWithOutlet !== last(commands)) {
1006
- throw new ɵRuntimeError(4004 /* RuntimeErrorCode.MISPLACED_OUTLETS_COMMAND */, NG_DEV_MODE$8 && '{outlets:{}} has to be the last command');
1006
+ throw new ɵRuntimeError(4004 /* RuntimeErrorCode.MISPLACED_OUTLETS_COMMAND */, NG_DEV_MODE$9 && '{outlets:{}} has to be the last command');
1007
1007
  }
1008
1008
  }
1009
1009
  toRoot() {
@@ -1102,7 +1102,7 @@ function createPositionApplyingDoubleDots(group, index, numberOfDoubleDots) {
1102
1102
  dd -= ci;
1103
1103
  g = g.parent;
1104
1104
  if (!g) {
1105
- throw new ɵRuntimeError(4005 /* RuntimeErrorCode.INVALID_DOUBLE_DOTS */, NG_DEV_MODE$8 && 'Invalid number of \'../\'');
1105
+ throw new ɵRuntimeError(4005 /* RuntimeErrorCode.INVALID_DOUBLE_DOTS */, NG_DEV_MODE$9 && 'Invalid number of \'../\'');
1106
1106
  }
1107
1107
  ci = g.segments.length;
1108
1108
  }
@@ -2386,9 +2386,9 @@ class ChildrenOutletContexts {
2386
2386
  return this.contexts.get(childName) || null;
2387
2387
  }
2388
2388
  }
2389
- ChildrenOutletContexts.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: ChildrenOutletContexts, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2390
- ChildrenOutletContexts.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: ChildrenOutletContexts, providedIn: 'root' });
2391
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: ChildrenOutletContexts, decorators: [{
2389
+ ChildrenOutletContexts.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ChildrenOutletContexts, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2390
+ ChildrenOutletContexts.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ChildrenOutletContexts, providedIn: 'root' });
2391
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ChildrenOutletContexts, decorators: [{
2392
2392
  type: Injectable,
2393
2393
  args: [{ providedIn: 'root' }]
2394
2394
  }] });
@@ -2400,7 +2400,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.4", ng
2400
2400
  * Use of this source code is governed by an MIT-style license that can be
2401
2401
  * found in the LICENSE file at https://angular.io/license
2402
2402
  */
2403
- const NG_DEV_MODE$7 = typeof ngDevMode === 'undefined' || ngDevMode;
2403
+ const NG_DEV_MODE$8 = typeof ngDevMode === 'undefined' || ngDevMode;
2404
2404
  /**
2405
2405
  * @description
2406
2406
  *
@@ -2540,12 +2540,12 @@ class RouterOutlet {
2540
2540
  */
2541
2541
  get component() {
2542
2542
  if (!this.activated)
2543
- throw new ɵRuntimeError(4012 /* RuntimeErrorCode.OUTLET_NOT_ACTIVATED */, NG_DEV_MODE$7 && 'Outlet is not activated');
2543
+ throw new ɵRuntimeError(4012 /* RuntimeErrorCode.OUTLET_NOT_ACTIVATED */, NG_DEV_MODE$8 && 'Outlet is not activated');
2544
2544
  return this.activated.instance;
2545
2545
  }
2546
2546
  get activatedRoute() {
2547
2547
  if (!this.activated)
2548
- throw new ɵRuntimeError(4012 /* RuntimeErrorCode.OUTLET_NOT_ACTIVATED */, NG_DEV_MODE$7 && 'Outlet is not activated');
2548
+ throw new ɵRuntimeError(4012 /* RuntimeErrorCode.OUTLET_NOT_ACTIVATED */, NG_DEV_MODE$8 && 'Outlet is not activated');
2549
2549
  return this._activatedRoute;
2550
2550
  }
2551
2551
  get activatedRouteData() {
@@ -2559,7 +2559,7 @@ class RouterOutlet {
2559
2559
  */
2560
2560
  detach() {
2561
2561
  if (!this.activated)
2562
- throw new ɵRuntimeError(4012 /* RuntimeErrorCode.OUTLET_NOT_ACTIVATED */, NG_DEV_MODE$7 && 'Outlet is not activated');
2562
+ throw new ɵRuntimeError(4012 /* RuntimeErrorCode.OUTLET_NOT_ACTIVATED */, NG_DEV_MODE$8 && 'Outlet is not activated');
2563
2563
  this.location.detach();
2564
2564
  const cmp = this.activated;
2565
2565
  this.activated = null;
@@ -2587,11 +2587,11 @@ class RouterOutlet {
2587
2587
  }
2588
2588
  activateWith(activatedRoute, resolverOrInjector) {
2589
2589
  if (this.isActivated) {
2590
- throw new ɵRuntimeError(4013 /* RuntimeErrorCode.OUTLET_ALREADY_ACTIVATED */, NG_DEV_MODE$7 && 'Cannot activate an already activated outlet');
2590
+ throw new ɵRuntimeError(4013 /* RuntimeErrorCode.OUTLET_ALREADY_ACTIVATED */, NG_DEV_MODE$8 && 'Cannot activate an already activated outlet');
2591
2591
  }
2592
2592
  this._activatedRoute = activatedRoute;
2593
2593
  const location = this.location;
2594
- const snapshot = activatedRoute._futureSnapshot;
2594
+ const snapshot = activatedRoute.snapshot;
2595
2595
  const component = snapshot.component;
2596
2596
  const childContexts = this.parentContexts.getOrCreateContext(this.name).children;
2597
2597
  const injector = new OutletInjector(activatedRoute, childContexts, location.injector);
@@ -2609,9 +2609,9 @@ class RouterOutlet {
2609
2609
  this.activateEvents.emit(this.activated.instance);
2610
2610
  }
2611
2611
  }
2612
- RouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: RouterOutlet, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2613
- RouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-rc.4", type: RouterOutlet, isStandalone: true, selector: "router-outlet", inputs: { name: "name" }, outputs: { activateEvents: "activate", deactivateEvents: "deactivate", attachEvents: "attach", detachEvents: "detach" }, exportAs: ["outlet"], usesOnChanges: true, ngImport: i0 });
2614
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: RouterOutlet, decorators: [{
2612
+ RouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: RouterOutlet, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2613
+ RouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.1", type: RouterOutlet, isStandalone: true, selector: "router-outlet", inputs: { name: "name" }, outputs: { activateEvents: "activate", deactivateEvents: "deactivate", attachEvents: "attach", detachEvents: "detach" }, exportAs: ["outlet"], usesOnChanges: true, ngImport: i0 });
2614
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: RouterOutlet, decorators: [{
2615
2615
  type: Directive,
2616
2616
  args: [{
2617
2617
  selector: 'router-outlet',
@@ -2671,9 +2671,9 @@ function isComponentFactoryResolver(item) {
2671
2671
  */
2672
2672
  class ɵEmptyOutletComponent {
2673
2673
  }
2674
- ɵEmptyOutletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: ɵEmptyOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2675
- ɵEmptyOutletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.0-rc.4", type: ɵEmptyOutletComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: `<router-outlet></router-outlet>`, isInline: true, dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] });
2676
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: ɵEmptyOutletComponent, decorators: [{
2674
+ ɵEmptyOutletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ɵEmptyOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2675
+ ɵEmptyOutletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: ɵEmptyOutletComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: `<router-outlet></router-outlet>`, isInline: true, dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] });
2676
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ɵEmptyOutletComponent, decorators: [{
2677
2677
  type: Component,
2678
2678
  args: [{
2679
2679
  template: `<router-outlet></router-outlet>`,
@@ -3591,7 +3591,7 @@ function noLeftoversInUrl(segmentGroup, segments, outlet) {
3591
3591
  * Use of this source code is governed by an MIT-style license that can be
3592
3592
  * found in the LICENSE file at https://angular.io/license
3593
3593
  */
3594
- const NG_DEV_MODE$6 = typeof ngDevMode === 'undefined' || ngDevMode;
3594
+ const NG_DEV_MODE$7 = typeof ngDevMode === 'undefined' || ngDevMode;
3595
3595
  class NoMatch$1 {
3596
3596
  constructor(segmentGroup) {
3597
3597
  this.segmentGroup = segmentGroup || null;
@@ -3609,11 +3609,11 @@ function absoluteRedirect(newTree) {
3609
3609
  return throwError(new AbsoluteRedirect(newTree));
3610
3610
  }
3611
3611
  function namedOutletsRedirect(redirectTo) {
3612
- return throwError(new ɵRuntimeError(4000 /* RuntimeErrorCode.NAMED_OUTLET_REDIRECT */, NG_DEV_MODE$6 &&
3612
+ return throwError(new ɵRuntimeError(4000 /* RuntimeErrorCode.NAMED_OUTLET_REDIRECT */, NG_DEV_MODE$7 &&
3613
3613
  `Only absolute redirects can have named outlets. redirectTo: '${redirectTo}'`));
3614
3614
  }
3615
3615
  function canLoadFails(route) {
3616
- return throwError(navigationCancelingError(NG_DEV_MODE$6 &&
3616
+ return throwError(navigationCancelingError(NG_DEV_MODE$7 &&
3617
3617
  `Cannot load children because the guard of the route "path: '${route.path}'" returned false`, 3 /* NavigationCancellationCode.GuardRejected */));
3618
3618
  }
3619
3619
  /**
@@ -3673,7 +3673,7 @@ class ApplyRedirects {
3673
3673
  }));
3674
3674
  }
3675
3675
  noMatchError(e) {
3676
- return new ɵRuntimeError(4002 /* RuntimeErrorCode.NO_MATCH */, NG_DEV_MODE$6 && `Cannot match any routes. URL Segment: '${e.segmentGroup}'`);
3676
+ return new ɵRuntimeError(4002 /* RuntimeErrorCode.NO_MATCH */, NG_DEV_MODE$7 && `Cannot match any routes. URL Segment: '${e.segmentGroup}'`);
3677
3677
  }
3678
3678
  createUrlTree(rootCandidate, queryParams, fragment) {
3679
3679
  const root = createRoot(rootCandidate);
@@ -3890,7 +3890,7 @@ class ApplyRedirects {
3890
3890
  findPosParam(redirectTo, redirectToUrlSegment, posParams) {
3891
3891
  const pos = posParams[redirectToUrlSegment.path.substring(1)];
3892
3892
  if (!pos)
3893
- throw new ɵRuntimeError(4001 /* RuntimeErrorCode.MISSING_REDIRECT */, NG_DEV_MODE$6 &&
3893
+ throw new ɵRuntimeError(4001 /* RuntimeErrorCode.MISSING_REDIRECT */, NG_DEV_MODE$7 &&
3894
3894
  `Cannot redirect to '${redirectTo}'. Cannot find '${redirectToUrlSegment.path}'.`);
3895
3895
  return pos;
3896
3896
  }
@@ -3926,7 +3926,7 @@ function applyRedirects(environmentInjector, configLoader, urlSerializer, config
3926
3926
  * Use of this source code is governed by an MIT-style license that can be
3927
3927
  * found in the LICENSE file at https://angular.io/license
3928
3928
  */
3929
- const NG_DEV_MODE$5 = typeof ngDevMode === 'undefined' || !!ngDevMode;
3929
+ const NG_DEV_MODE$6 = typeof ngDevMode === 'undefined' || !!ngDevMode;
3930
3930
  class NoMatch {
3931
3931
  }
3932
3932
  function newObservableError(e) {
@@ -4014,7 +4014,7 @@ class Recognizer {
4014
4014
  // multiple activated results for the same outlet. We should merge the children of
4015
4015
  // these results so the final return value is only one `TreeNode` per outlet.
4016
4016
  const mergedChildren = mergeEmptyPathMatches(children);
4017
- if (NG_DEV_MODE$5) {
4017
+ if (NG_DEV_MODE$6) {
4018
4018
  // This should really never happen - we are only taking the first match for each
4019
4019
  // outlet and merge the empty path matches.
4020
4020
  checkOutletNameUniqueness(mergedChildren);
@@ -4173,7 +4173,7 @@ function checkOutletNameUniqueness(nodes) {
4173
4173
  if (routeWithSameOutletName) {
4174
4174
  const p = routeWithSameOutletName.url.map(s => s.toString()).join('/');
4175
4175
  const c = n.value.url.map(s => s.toString()).join('/');
4176
- throw new ɵRuntimeError(4006 /* RuntimeErrorCode.TWO_SEGMENTS_WITH_SAME_OUTLET */, NG_DEV_MODE$5 && `Two segments cannot have the same outlet name: '${p}' and '${c}'.`);
4176
+ throw new ɵRuntimeError(4006 /* RuntimeErrorCode.TWO_SEGMENTS_WITH_SAME_OUTLET */, NG_DEV_MODE$6 && `Two segments cannot have the same outlet name: '${p}' and '${c}'.`);
4177
4177
  }
4178
4178
  names[n.value.outlet] = n.value;
4179
4179
  });
@@ -4307,6 +4307,301 @@ function switchTap(next) {
4307
4307
  });
4308
4308
  }
4309
4309
 
4310
+ /**
4311
+ * @license
4312
+ * Copyright Google LLC All Rights Reserved.
4313
+ *
4314
+ * Use of this source code is governed by an MIT-style license that can be
4315
+ * found in the LICENSE file at https://angular.io/license
4316
+ */
4317
+ const NG_DEV_MODE$5 = typeof ngDevMode === 'undefined' || !!ngDevMode;
4318
+ class NavigationTransitions {
4319
+ constructor(router) {
4320
+ this.router = router;
4321
+ this.currentNavigation = null;
4322
+ }
4323
+ setupNavigations(transitions) {
4324
+ const eventsSubject = this.router.events;
4325
+ return transitions.pipe(filter(t => t.id !== 0),
4326
+ // Extract URL
4327
+ map(t => (Object.assign(Object.assign({}, t), { extractedUrl: this.router.urlHandlingStrategy.extract(t.rawUrl) }))),
4328
+ // Using switchMap so we cancel executing navigations when a new one comes in
4329
+ switchMap(overallTransitionState => {
4330
+ let completed = false;
4331
+ let errored = false;
4332
+ return of(overallTransitionState)
4333
+ .pipe(
4334
+ // Store the Navigation object
4335
+ tap(t => {
4336
+ this.currentNavigation = {
4337
+ id: t.id,
4338
+ initialUrl: t.rawUrl,
4339
+ extractedUrl: t.extractedUrl,
4340
+ trigger: t.source,
4341
+ extras: t.extras,
4342
+ previousNavigation: !this.router.lastSuccessfulNavigation ? null : Object.assign(Object.assign({}, this.router.lastSuccessfulNavigation), { previousNavigation: null }),
4343
+ };
4344
+ }), switchMap(t => {
4345
+ const browserUrlTree = this.router.browserUrlTree.toString();
4346
+ const urlTransition = !this.router.navigated ||
4347
+ t.extractedUrl.toString() !== browserUrlTree ||
4348
+ // Navigations which succeed or ones which fail and are cleaned up
4349
+ // correctly should result in `browserUrlTree` and `currentUrlTree`
4350
+ // matching. If this is not the case, assume something went wrong and
4351
+ // try processing the URL again.
4352
+ browserUrlTree !== this.router.currentUrlTree.toString();
4353
+ const processCurrentUrl = (this.router.onSameUrlNavigation === 'reload' ? true :
4354
+ urlTransition) &&
4355
+ this.router.urlHandlingStrategy.shouldProcessUrl(t.rawUrl);
4356
+ if (processCurrentUrl) {
4357
+ // If the source of the navigation is from a browser event, the URL is
4358
+ // already updated. We already need to sync the internal state.
4359
+ if (isBrowserTriggeredNavigation(t.source)) {
4360
+ this.router.browserUrlTree = t.extractedUrl;
4361
+ }
4362
+ return of(t).pipe(
4363
+ // Fire NavigationStart event
4364
+ switchMap(t => {
4365
+ const transition = this.router.transitions.getValue();
4366
+ eventsSubject.next(new NavigationStart(t.id, this.router.serializeUrl(t.extractedUrl), t.source, t.restoredState));
4367
+ if (transition !== this.router.transitions.getValue()) {
4368
+ return EMPTY;
4369
+ }
4370
+ // This delay is required to match old behavior that forced
4371
+ // navigation to always be async
4372
+ return Promise.resolve(t);
4373
+ }),
4374
+ // ApplyRedirects
4375
+ applyRedirects(this.router.ngModule.injector, this.router.configLoader, this.router.urlSerializer, this.router.config),
4376
+ // Update the currentNavigation
4377
+ // `urlAfterRedirects` is guaranteed to be set after this point
4378
+ tap(t => {
4379
+ this.currentNavigation = Object.assign(Object.assign({}, this.currentNavigation), { finalUrl: t.urlAfterRedirects });
4380
+ overallTransitionState.urlAfterRedirects = t.urlAfterRedirects;
4381
+ }),
4382
+ // Recognize
4383
+ recognize(this.router.ngModule.injector, this.router.rootComponentType, this.router.config, this.router.urlSerializer, this.router.paramsInheritanceStrategy),
4384
+ // Update URL if in `eager` update mode
4385
+ tap(t => {
4386
+ overallTransitionState.targetSnapshot = t.targetSnapshot;
4387
+ if (this.router.urlUpdateStrategy === 'eager') {
4388
+ if (!t.extras.skipLocationChange) {
4389
+ const rawUrl = this.router.urlHandlingStrategy.merge(t.urlAfterRedirects, t.rawUrl);
4390
+ this.router.setBrowserUrl(rawUrl, t);
4391
+ }
4392
+ this.router.browserUrlTree = t.urlAfterRedirects;
4393
+ }
4394
+ // Fire RoutesRecognized
4395
+ const routesRecognized = new RoutesRecognized(t.id, this.router.serializeUrl(t.extractedUrl), this.router.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);
4396
+ eventsSubject.next(routesRecognized);
4397
+ }));
4398
+ }
4399
+ else {
4400
+ const processPreviousUrl = urlTransition && this.router.rawUrlTree &&
4401
+ this.router.urlHandlingStrategy.shouldProcessUrl(this.router.rawUrlTree);
4402
+ /* When the current URL shouldn't be processed, but the previous one
4403
+ * was, we handle this "error condition" by navigating to the
4404
+ * previously successful URL, but leaving the URL intact.*/
4405
+ if (processPreviousUrl) {
4406
+ const { id, extractedUrl, source, restoredState, extras } = t;
4407
+ const navStart = new NavigationStart(id, this.router.serializeUrl(extractedUrl), source, restoredState);
4408
+ eventsSubject.next(navStart);
4409
+ const targetSnapshot = createEmptyState(extractedUrl, this.router.rootComponentType)
4410
+ .snapshot;
4411
+ overallTransitionState = Object.assign(Object.assign({}, t), { targetSnapshot, urlAfterRedirects: extractedUrl, extras: Object.assign(Object.assign({}, extras), { skipLocationChange: false, replaceUrl: false }) });
4412
+ return of(overallTransitionState);
4413
+ }
4414
+ else {
4415
+ /* When neither the current or previous URL can be processed, do
4416
+ * nothing other than update router's internal reference to the
4417
+ * current "settled" URL. This way the next navigation will be coming
4418
+ * from the current URL in the browser.
4419
+ */
4420
+ this.router.rawUrlTree = t.rawUrl;
4421
+ t.resolve(null);
4422
+ return EMPTY;
4423
+ }
4424
+ }
4425
+ }),
4426
+ // --- GUARDS ---
4427
+ tap(t => {
4428
+ const guardsStart = new GuardsCheckStart(t.id, this.router.serializeUrl(t.extractedUrl), this.router.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);
4429
+ this.router.triggerEvent(guardsStart);
4430
+ }), map(t => {
4431
+ overallTransitionState = Object.assign(Object.assign({}, t), { guards: getAllRouteGuards(t.targetSnapshot, t.currentSnapshot, this.router.rootContexts) });
4432
+ return overallTransitionState;
4433
+ }), checkGuards(this.router.ngModule.injector, (evt) => this.router.triggerEvent(evt)), tap(t => {
4434
+ overallTransitionState.guardsResult = t.guardsResult;
4435
+ if (isUrlTree(t.guardsResult)) {
4436
+ throw redirectingNavigationError(this.router.urlSerializer, t.guardsResult);
4437
+ }
4438
+ const guardsEnd = new GuardsCheckEnd(t.id, this.router.serializeUrl(t.extractedUrl), this.router.serializeUrl(t.urlAfterRedirects), t.targetSnapshot, !!t.guardsResult);
4439
+ this.router.triggerEvent(guardsEnd);
4440
+ }), filter(t => {
4441
+ if (!t.guardsResult) {
4442
+ this.router.restoreHistory(t);
4443
+ this.router.cancelNavigationTransition(t, '', 3 /* NavigationCancellationCode.GuardRejected */);
4444
+ return false;
4445
+ }
4446
+ return true;
4447
+ }),
4448
+ // --- RESOLVE ---
4449
+ switchTap(t => {
4450
+ if (t.guards.canActivateChecks.length) {
4451
+ return of(t).pipe(tap(t => {
4452
+ const resolveStart = new ResolveStart(t.id, this.router.serializeUrl(t.extractedUrl), this.router.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);
4453
+ this.router.triggerEvent(resolveStart);
4454
+ }), switchMap(t => {
4455
+ let dataResolved = false;
4456
+ return of(t).pipe(resolveData(this.router.paramsInheritanceStrategy, this.router.ngModule.injector), tap({
4457
+ next: () => dataResolved = true,
4458
+ complete: () => {
4459
+ if (!dataResolved) {
4460
+ this.router.restoreHistory(t);
4461
+ this.router.cancelNavigationTransition(t, NG_DEV_MODE$5 ?
4462
+ `At least one route resolver didn't emit any value.` :
4463
+ '', 2 /* NavigationCancellationCode.NoDataFromResolver */);
4464
+ }
4465
+ }
4466
+ }));
4467
+ }), tap(t => {
4468
+ const resolveEnd = new ResolveEnd(t.id, this.router.serializeUrl(t.extractedUrl), this.router.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);
4469
+ this.router.triggerEvent(resolveEnd);
4470
+ }));
4471
+ }
4472
+ return undefined;
4473
+ }),
4474
+ // --- LOAD COMPONENTS ---
4475
+ switchTap((t) => {
4476
+ const loadComponents = (route) => {
4477
+ var _a;
4478
+ const loaders = [];
4479
+ if (((_a = route.routeConfig) === null || _a === void 0 ? void 0 : _a.loadComponent) &&
4480
+ !route.routeConfig._loadedComponent) {
4481
+ loaders.push(this.router.configLoader.loadComponent(route.routeConfig)
4482
+ .pipe(tap(loadedComponent => {
4483
+ route.component = loadedComponent;
4484
+ }), map(() => void 0)));
4485
+ }
4486
+ for (const child of route.children) {
4487
+ loaders.push(...loadComponents(child));
4488
+ }
4489
+ return loaders;
4490
+ };
4491
+ return combineLatest(loadComponents(t.targetSnapshot.root))
4492
+ .pipe(defaultIfEmpty(), take(1));
4493
+ }), switchTap(() => this.router.afterPreactivation()), map((t) => {
4494
+ const targetRouterState = createRouterState(this.router.routeReuseStrategy, t.targetSnapshot, t.currentRouterState);
4495
+ overallTransitionState = Object.assign(Object.assign({}, t), { targetRouterState });
4496
+ return (overallTransitionState);
4497
+ }),
4498
+ /* Once here, we are about to activate synchronously. The assumption is
4499
+ this will succeed, and user code may read from the Router service.
4500
+ Therefore before activation, we need to update router properties storing
4501
+ the current URL and the RouterState, as well as updated the browser URL.
4502
+ All this should happen *before* activating. */
4503
+ tap((t) => {
4504
+ this.router.currentUrlTree = t.urlAfterRedirects;
4505
+ this.router.rawUrlTree = this.router.urlHandlingStrategy.merge(t.urlAfterRedirects, t.rawUrl);
4506
+ this.router.routerState =
4507
+ t.targetRouterState;
4508
+ if (this.router.urlUpdateStrategy === 'deferred') {
4509
+ if (!t.extras.skipLocationChange) {
4510
+ this.router.setBrowserUrl(this.router.rawUrlTree, t);
4511
+ }
4512
+ this.router.browserUrlTree = t.urlAfterRedirects;
4513
+ }
4514
+ }), activateRoutes(this.router.rootContexts, this.router.routeReuseStrategy, (evt) => this.router.triggerEvent(evt)), tap({
4515
+ next() {
4516
+ completed = true;
4517
+ },
4518
+ complete() {
4519
+ completed = true;
4520
+ }
4521
+ }), finalize(() => {
4522
+ var _a;
4523
+ /* When the navigation stream finishes either through error or success,
4524
+ * we set the `completed` or `errored` flag. However, there are some
4525
+ * situations where we could get here without either of those being set.
4526
+ * For instance, a redirect during NavigationStart. Therefore, this is a
4527
+ * catch-all to make sure the NavigationCancel event is fired when a
4528
+ * navigation gets cancelled but not caught by other means. */
4529
+ if (!completed && !errored) {
4530
+ const cancelationReason = NG_DEV_MODE$5 ?
4531
+ `Navigation ID ${overallTransitionState
4532
+ .id} is not equal to the current navigation id ${this.router.navigationId}` :
4533
+ '';
4534
+ this.router.cancelNavigationTransition(overallTransitionState, cancelationReason, 1 /* NavigationCancellationCode.SupersededByNewNavigation */);
4535
+ }
4536
+ // Only clear current navigation if it is still set to the one that
4537
+ // finalized.
4538
+ if (((_a = this.currentNavigation) === null || _a === void 0 ? void 0 : _a.id) === overallTransitionState.id) {
4539
+ this.currentNavigation = null;
4540
+ }
4541
+ }), catchError((e) => {
4542
+ var _a;
4543
+ errored = true;
4544
+ /* This error type is issued during Redirect, and is handled as a
4545
+ * cancellation rather than an error. */
4546
+ if (isNavigationCancelingError$1(e)) {
4547
+ if (!isRedirectingNavigationCancelingError$1(e)) {
4548
+ // Set property only if we're not redirecting. If we landed on a page
4549
+ // and redirect to `/` route, the new navigation is going to see the
4550
+ // `/` isn't a change from the default currentUrlTree and won't
4551
+ // navigate. This is only applicable with initial navigation, so
4552
+ // setting `navigated` only when not redirecting resolves this
4553
+ // scenario.
4554
+ this.router.navigated = true;
4555
+ this.router.restoreHistory(overallTransitionState, true);
4556
+ }
4557
+ const navCancel = new NavigationCancel(overallTransitionState.id, this.router.serializeUrl(overallTransitionState.extractedUrl), e.message, e.cancellationCode);
4558
+ eventsSubject.next(navCancel);
4559
+ // When redirecting, we need to delay resolving the navigation
4560
+ // promise and push it to the redirect navigation
4561
+ if (!isRedirectingNavigationCancelingError$1(e)) {
4562
+ overallTransitionState.resolve(false);
4563
+ }
4564
+ else {
4565
+ const mergedTree = this.router.urlHandlingStrategy.merge(e.url, this.router.rawUrlTree);
4566
+ const extras = {
4567
+ skipLocationChange: overallTransitionState.extras.skipLocationChange,
4568
+ // The URL is already updated at this point if we have 'eager' URL
4569
+ // updates or if the navigation was triggered by the browser (back
4570
+ // button, URL bar, etc). We want to replace that item in history
4571
+ // if the navigation is rejected.
4572
+ replaceUrl: this.router.urlUpdateStrategy === 'eager' ||
4573
+ isBrowserTriggeredNavigation(overallTransitionState.source)
4574
+ };
4575
+ this.router.scheduleNavigation(mergedTree, 'imperative', null, extras, {
4576
+ resolve: overallTransitionState.resolve,
4577
+ reject: overallTransitionState.reject,
4578
+ promise: overallTransitionState.promise
4579
+ });
4580
+ }
4581
+ /* All other errors should reset to the router's internal URL reference
4582
+ * to the pre-error state. */
4583
+ }
4584
+ else {
4585
+ this.router.restoreHistory(overallTransitionState, true);
4586
+ const navError = new NavigationError(overallTransitionState.id, this.router.serializeUrl(overallTransitionState.extractedUrl), e, (_a = overallTransitionState.targetSnapshot) !== null && _a !== void 0 ? _a : undefined);
4587
+ eventsSubject.next(navError);
4588
+ try {
4589
+ overallTransitionState.resolve(this.router.errorHandler(e));
4590
+ }
4591
+ catch (ee) {
4592
+ overallTransitionState.reject(ee);
4593
+ }
4594
+ }
4595
+ return EMPTY;
4596
+ }));
4597
+ // TODO(jasonaden): remove cast once g3 is on updated TypeScript
4598
+ }));
4599
+ }
4600
+ }
4601
+ function isBrowserTriggeredNavigation(source) {
4602
+ return source !== 'imperative';
4603
+ }
4604
+
4310
4605
  /**
4311
4606
  * @license
4312
4607
  * Copyright Google LLC All Rights Reserved.
@@ -4359,9 +4654,9 @@ class TitleStrategy {
4359
4654
  return snapshot.data[RouteTitleKey];
4360
4655
  }
4361
4656
  }
4362
- TitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: TitleStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4363
- TitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: TitleStrategy, providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) });
4364
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: TitleStrategy, decorators: [{
4657
+ TitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: TitleStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4658
+ TitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: TitleStrategy, providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) });
4659
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: TitleStrategy, decorators: [{
4365
4660
  type: Injectable,
4366
4661
  args: [{ providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) }]
4367
4662
  }] });
@@ -4385,9 +4680,9 @@ class DefaultTitleStrategy extends TitleStrategy {
4385
4680
  }
4386
4681
  }
4387
4682
  }
4388
- DefaultTitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: DefaultTitleStrategy, deps: [{ token: i1.Title }], target: i0.ɵɵFactoryTarget.Injectable });
4389
- DefaultTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: DefaultTitleStrategy, providedIn: 'root' });
4390
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: DefaultTitleStrategy, decorators: [{
4683
+ DefaultTitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: DefaultTitleStrategy, deps: [{ token: i1.Title }], target: i0.ɵɵFactoryTarget.Injectable });
4684
+ DefaultTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: DefaultTitleStrategy, providedIn: 'root' });
4685
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: DefaultTitleStrategy, decorators: [{
4391
4686
  type: Injectable,
4392
4687
  args: [{ providedIn: 'root' }]
4393
4688
  }], ctorParameters: function () { return [{ type: i1.Title }]; } });
@@ -4408,6 +4703,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.4", ng
4408
4703
  */
4409
4704
  class RouteReuseStrategy {
4410
4705
  }
4706
+ RouteReuseStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: RouteReuseStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4707
+ RouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: RouteReuseStrategy, providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) });
4708
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: RouteReuseStrategy, decorators: [{
4709
+ type: Injectable,
4710
+ args: [{ providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) }]
4711
+ }] });
4411
4712
  /**
4412
4713
  * @description
4413
4714
  *
@@ -4456,6 +4757,12 @@ class BaseRouteReuseStrategy {
4456
4757
  }
4457
4758
  class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {
4458
4759
  }
4760
+ DefaultRouteReuseStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: DefaultRouteReuseStrategy, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
4761
+ DefaultRouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: DefaultRouteReuseStrategy, providedIn: 'root' });
4762
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: DefaultRouteReuseStrategy, decorators: [{
4763
+ type: Injectable,
4764
+ args: [{ providedIn: 'root' }]
4765
+ }] });
4459
4766
 
4460
4767
  /**
4461
4768
  * @license
@@ -4598,9 +4905,9 @@ class RouterConfigLoader {
4598
4905
  }));
4599
4906
  }
4600
4907
  }
4601
- RouterConfigLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: RouterConfigLoader, deps: [{ token: i0.Injector }, { token: i0.Compiler }], target: i0.ɵɵFactoryTarget.Injectable });
4602
- RouterConfigLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: RouterConfigLoader, providedIn: 'root' });
4603
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: RouterConfigLoader, decorators: [{
4908
+ RouterConfigLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: RouterConfigLoader, deps: [{ token: i0.Injector }, { token: i0.Compiler }], target: i0.ɵɵFactoryTarget.Injectable });
4909
+ RouterConfigLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: RouterConfigLoader, providedIn: 'root' });
4910
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: RouterConfigLoader, decorators: [{
4604
4911
  type: Injectable,
4605
4912
  args: [{ providedIn: 'root' }]
4606
4913
  }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.Compiler }]; } });
@@ -4632,6 +4939,12 @@ function maybeUnwrapDefaultExport(input) {
4632
4939
  */
4633
4940
  class UrlHandlingStrategy {
4634
4941
  }
4942
+ UrlHandlingStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: UrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4943
+ UrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: UrlHandlingStrategy, providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) });
4944
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: UrlHandlingStrategy, decorators: [{
4945
+ type: Injectable,
4946
+ args: [{ providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) }]
4947
+ }] });
4635
4948
  /**
4636
4949
  * @publicApi
4637
4950
  */
@@ -4646,6 +4959,12 @@ class DefaultUrlHandlingStrategy {
4646
4959
  return newUrlPart;
4647
4960
  }
4648
4961
  }
4962
+ DefaultUrlHandlingStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: DefaultUrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4963
+ DefaultUrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: DefaultUrlHandlingStrategy, providedIn: 'root' });
4964
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: DefaultUrlHandlingStrategy, decorators: [{
4965
+ type: Injectable,
4966
+ args: [{ providedIn: 'root' }]
4967
+ }] });
4649
4968
 
4650
4969
  /**
4651
4970
  * @license
@@ -4710,18 +5029,7 @@ function setupRouter() {
4710
5029
  const compiler = inject(Compiler);
4711
5030
  const config = (_a = inject(ROUTES, { optional: true })) !== null && _a !== void 0 ? _a : [];
4712
5031
  const opts = (_b = inject(ROUTER_CONFIGURATION, { optional: true })) !== null && _b !== void 0 ? _b : {};
4713
- const defaultTitleStrategy = inject(DefaultTitleStrategy);
4714
- const titleStrategy = inject(TitleStrategy, { optional: true });
4715
- const urlHandlingStrategy = inject(UrlHandlingStrategy, { optional: true });
4716
- const routeReuseStrategy = inject(RouteReuseStrategy, { optional: true });
4717
5032
  const router = new Router(null, urlSerializer, contexts, location, injector, compiler, flatten(config));
4718
- if (urlHandlingStrategy) {
4719
- router.urlHandlingStrategy = urlHandlingStrategy;
4720
- }
4721
- if (routeReuseStrategy) {
4722
- router.routeReuseStrategy = routeReuseStrategy;
4723
- }
4724
- router.titleStrategy = titleStrategy !== null && titleStrategy !== void 0 ? titleStrategy : defaultTitleStrategy;
4725
5033
  assignExtraOptionsToRouter(opts, router);
4726
5034
  return router;
4727
5035
  }
@@ -4742,15 +5050,24 @@ class Router {
4742
5050
  * Creates the router service.
4743
5051
  */
4744
5052
  // TODO: vsavkin make internal after the final is out.
4745
- constructor(rootComponentType, urlSerializer, rootContexts, location, injector, compiler, config) {
5053
+ constructor(
5054
+ /** @internal */
5055
+ rootComponentType,
5056
+ /** @internal */
5057
+ urlSerializer,
5058
+ /** @internal */
5059
+ rootContexts,
5060
+ /** @internal */
5061
+ location, injector, compiler, config) {
4746
5062
  this.rootComponentType = rootComponentType;
4747
5063
  this.urlSerializer = urlSerializer;
4748
5064
  this.rootContexts = rootContexts;
4749
5065
  this.location = location;
4750
5066
  this.config = config;
5067
+ /** @internal */
4751
5068
  this.lastSuccessfulNavigation = null;
4752
- this.currentNavigation = null;
4753
5069
  this.disposed = false;
5070
+ /** @internal */
4754
5071
  this.navigationId = 0;
4755
5072
  /**
4756
5073
  * The id of the currently active page in the router.
@@ -4794,11 +5111,15 @@ class Router {
4794
5111
  * A strategy for extracting and merging URLs.
4795
5112
  * Used for AngularJS to Angular migrations.
4796
5113
  */
4797
- this.urlHandlingStrategy = new DefaultUrlHandlingStrategy();
5114
+ this.urlHandlingStrategy = inject(UrlHandlingStrategy);
4798
5115
  /**
4799
5116
  * A strategy for re-using routes.
4800
5117
  */
4801
- this.routeReuseStrategy = new DefaultRouteReuseStrategy();
5118
+ this.routeReuseStrategy = inject(RouteReuseStrategy);
5119
+ /**
5120
+ * A strategy for setting the title based on the `routerState`.
5121
+ */
5122
+ this.titleStrategy = inject(TitleStrategy);
4802
5123
  /**
4803
5124
  * How to handle a navigation request to the current URL. One of:
4804
5125
  *
@@ -4854,6 +5175,7 @@ class Router {
4854
5175
  *
4855
5176
  */
4856
5177
  this.canceledNavigationResolution = 'replace';
5178
+ this.navigationTransitions = new NavigationTransitions(this);
4857
5179
  const onLoadStart = (r) => this.triggerEvent(new RouteConfigLoadStart(r));
4858
5180
  const onLoadEnd = (r) => this.triggerEvent(new RouteConfigLoadEnd(r));
4859
5181
  this.configLoader = injector.get(RouterConfigLoader);
@@ -4872,7 +5194,6 @@ class Router {
4872
5194
  id: 0,
4873
5195
  targetPageId: 0,
4874
5196
  currentUrlTree: this.currentUrlTree,
4875
- currentRawUrl: this.currentUrlTree,
4876
5197
  extractedUrl: this.urlHandlingStrategy.extract(this.currentUrlTree),
4877
5198
  urlAfterRedirects: this.urlHandlingStrategy.extract(this.currentUrlTree),
4878
5199
  rawUrl: this.currentUrlTree,
@@ -4889,7 +5210,7 @@ class Router {
4889
5210
  guards: { canActivateChecks: [], canDeactivateChecks: [] },
4890
5211
  guardsResult: null,
4891
5212
  });
4892
- this.navigations = this.setupNavigations(this.transitions);
5213
+ this.navigations = this.navigationTransitions.setupNavigations(this.transitions);
4893
5214
  this.processNavigations();
4894
5215
  }
4895
5216
  /**
@@ -4901,282 +5222,6 @@ class Router {
4901
5222
  var _a;
4902
5223
  return (_a = this.location.getState()) === null || _a === void 0 ? void 0 : _a.ɵrouterPageId;
4903
5224
  }
4904
- setupNavigations(transitions) {
4905
- const eventsSubject = this.events;
4906
- return transitions.pipe(filter(t => t.id !== 0),
4907
- // Extract URL
4908
- map(t => (Object.assign(Object.assign({}, t), { extractedUrl: this.urlHandlingStrategy.extract(t.rawUrl) }))),
4909
- // Using switchMap so we cancel executing navigations when a new one comes in
4910
- switchMap(overallTransitionState => {
4911
- let completed = false;
4912
- let errored = false;
4913
- return of(overallTransitionState)
4914
- .pipe(
4915
- // Store the Navigation object
4916
- tap(t => {
4917
- this.currentNavigation = {
4918
- id: t.id,
4919
- initialUrl: t.rawUrl,
4920
- extractedUrl: t.extractedUrl,
4921
- trigger: t.source,
4922
- extras: t.extras,
4923
- previousNavigation: this.lastSuccessfulNavigation ? Object.assign(Object.assign({}, this.lastSuccessfulNavigation), { previousNavigation: null }) :
4924
- null
4925
- };
4926
- }), switchMap(t => {
4927
- const browserUrlTree = this.browserUrlTree.toString();
4928
- const urlTransition = !this.navigated ||
4929
- t.extractedUrl.toString() !== browserUrlTree ||
4930
- // Navigations which succeed or ones which fail and are cleaned up
4931
- // correctly should result in `browserUrlTree` and `currentUrlTree`
4932
- // matching. If this is not the case, assume something went wrong and
4933
- // try processing the URL again.
4934
- browserUrlTree !== this.currentUrlTree.toString();
4935
- const processCurrentUrl = (this.onSameUrlNavigation === 'reload' ? true : urlTransition) &&
4936
- this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl);
4937
- if (processCurrentUrl) {
4938
- // If the source of the navigation is from a browser event, the URL is
4939
- // already updated. We already need to sync the internal state.
4940
- if (isBrowserTriggeredNavigation(t.source)) {
4941
- this.browserUrlTree = t.extractedUrl;
4942
- }
4943
- return of(t).pipe(
4944
- // Fire NavigationStart event
4945
- switchMap(t => {
4946
- const transition = this.transitions.getValue();
4947
- eventsSubject.next(new NavigationStart(t.id, this.serializeUrl(t.extractedUrl), t.source, t.restoredState));
4948
- if (transition !== this.transitions.getValue()) {
4949
- return EMPTY;
4950
- }
4951
- // This delay is required to match old behavior that forced
4952
- // navigation to always be async
4953
- return Promise.resolve(t);
4954
- }),
4955
- // ApplyRedirects
4956
- applyRedirects(this.ngModule.injector, this.configLoader, this.urlSerializer, this.config),
4957
- // Update the currentNavigation
4958
- // `urlAfterRedirects` is guaranteed to be set after this point
4959
- tap(t => {
4960
- this.currentNavigation = Object.assign(Object.assign({}, this.currentNavigation), { finalUrl: t.urlAfterRedirects });
4961
- overallTransitionState.urlAfterRedirects = t.urlAfterRedirects;
4962
- }),
4963
- // Recognize
4964
- recognize(this.ngModule.injector, this.rootComponentType, this.config, this.urlSerializer, this.paramsInheritanceStrategy),
4965
- // Update URL if in `eager` update mode
4966
- tap(t => {
4967
- overallTransitionState.targetSnapshot = t.targetSnapshot;
4968
- if (this.urlUpdateStrategy === 'eager') {
4969
- if (!t.extras.skipLocationChange) {
4970
- const rawUrl = this.urlHandlingStrategy.merge(t.urlAfterRedirects, t.rawUrl);
4971
- this.setBrowserUrl(rawUrl, t);
4972
- }
4973
- this.browserUrlTree = t.urlAfterRedirects;
4974
- }
4975
- // Fire RoutesRecognized
4976
- const routesRecognized = new RoutesRecognized(t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);
4977
- eventsSubject.next(routesRecognized);
4978
- }));
4979
- }
4980
- else {
4981
- const processPreviousUrl = urlTransition && this.rawUrlTree &&
4982
- this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree);
4983
- /* When the current URL shouldn't be processed, but the previous one
4984
- * was, we handle this "error condition" by navigating to the
4985
- * previously successful URL, but leaving the URL intact.*/
4986
- if (processPreviousUrl) {
4987
- const { id, extractedUrl, source, restoredState, extras } = t;
4988
- const navStart = new NavigationStart(id, this.serializeUrl(extractedUrl), source, restoredState);
4989
- eventsSubject.next(navStart);
4990
- const targetSnapshot = createEmptyState(extractedUrl, this.rootComponentType).snapshot;
4991
- overallTransitionState = Object.assign(Object.assign({}, t), { targetSnapshot, urlAfterRedirects: extractedUrl, extras: Object.assign(Object.assign({}, extras), { skipLocationChange: false, replaceUrl: false }) });
4992
- return of(overallTransitionState);
4993
- }
4994
- else {
4995
- /* When neither the current or previous URL can be processed, do
4996
- * nothing other than update router's internal reference to the
4997
- * current "settled" URL. This way the next navigation will be coming
4998
- * from the current URL in the browser.
4999
- */
5000
- this.rawUrlTree = t.rawUrl;
5001
- t.resolve(null);
5002
- return EMPTY;
5003
- }
5004
- }
5005
- }),
5006
- // --- GUARDS ---
5007
- tap(t => {
5008
- const guardsStart = new GuardsCheckStart(t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);
5009
- this.triggerEvent(guardsStart);
5010
- }), map(t => {
5011
- overallTransitionState = Object.assign(Object.assign({}, t), { guards: getAllRouteGuards(t.targetSnapshot, t.currentSnapshot, this.rootContexts) });
5012
- return overallTransitionState;
5013
- }), checkGuards(this.ngModule.injector, (evt) => this.triggerEvent(evt)), tap(t => {
5014
- overallTransitionState.guardsResult = t.guardsResult;
5015
- if (isUrlTree(t.guardsResult)) {
5016
- throw redirectingNavigationError(this.urlSerializer, t.guardsResult);
5017
- }
5018
- const guardsEnd = new GuardsCheckEnd(t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot, !!t.guardsResult);
5019
- this.triggerEvent(guardsEnd);
5020
- }), filter(t => {
5021
- if (!t.guardsResult) {
5022
- this.restoreHistory(t);
5023
- this.cancelNavigationTransition(t, '', 3 /* NavigationCancellationCode.GuardRejected */);
5024
- return false;
5025
- }
5026
- return true;
5027
- }),
5028
- // --- RESOLVE ---
5029
- switchTap(t => {
5030
- if (t.guards.canActivateChecks.length) {
5031
- return of(t).pipe(tap(t => {
5032
- const resolveStart = new ResolveStart(t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);
5033
- this.triggerEvent(resolveStart);
5034
- }), switchMap(t => {
5035
- let dataResolved = false;
5036
- return of(t).pipe(resolveData(this.paramsInheritanceStrategy, this.ngModule.injector), tap({
5037
- next: () => dataResolved = true,
5038
- complete: () => {
5039
- if (!dataResolved) {
5040
- this.restoreHistory(t);
5041
- this.cancelNavigationTransition(t, NG_DEV_MODE$2 ?
5042
- `At least one route resolver didn't emit any value.` :
5043
- '', 2 /* NavigationCancellationCode.NoDataFromResolver */);
5044
- }
5045
- }
5046
- }));
5047
- }), tap(t => {
5048
- const resolveEnd = new ResolveEnd(t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);
5049
- this.triggerEvent(resolveEnd);
5050
- }));
5051
- }
5052
- return undefined;
5053
- }),
5054
- // --- LOAD COMPONENTS ---
5055
- switchTap((t) => {
5056
- const loadComponents = (route) => {
5057
- var _a;
5058
- const loaders = [];
5059
- if (((_a = route.routeConfig) === null || _a === void 0 ? void 0 : _a.loadComponent) &&
5060
- !route.routeConfig._loadedComponent) {
5061
- loaders.push(this.configLoader.loadComponent(route.routeConfig)
5062
- .pipe(tap(loadedComponent => {
5063
- route.component = loadedComponent;
5064
- }), map(() => void 0)));
5065
- }
5066
- for (const child of route.children) {
5067
- loaders.push(...loadComponents(child));
5068
- }
5069
- return loaders;
5070
- };
5071
- return combineLatest(loadComponents(t.targetSnapshot.root))
5072
- .pipe(defaultIfEmpty(), take(1));
5073
- }), switchTap(() => this.afterPreactivation()), map((t) => {
5074
- const targetRouterState = createRouterState(this.routeReuseStrategy, t.targetSnapshot, t.currentRouterState);
5075
- overallTransitionState = Object.assign(Object.assign({}, t), { targetRouterState });
5076
- return (overallTransitionState);
5077
- }),
5078
- /* Once here, we are about to activate synchronously. The assumption is
5079
- this will succeed, and user code may read from the Router service.
5080
- Therefore before activation, we need to update router properties storing
5081
- the current URL and the RouterState, as well as updated the browser URL.
5082
- All this should happen *before* activating. */
5083
- tap((t) => {
5084
- this.currentUrlTree = t.urlAfterRedirects;
5085
- this.rawUrlTree =
5086
- this.urlHandlingStrategy.merge(t.urlAfterRedirects, t.rawUrl);
5087
- this.routerState = t.targetRouterState;
5088
- if (this.urlUpdateStrategy === 'deferred') {
5089
- if (!t.extras.skipLocationChange) {
5090
- this.setBrowserUrl(this.rawUrlTree, t);
5091
- }
5092
- this.browserUrlTree = t.urlAfterRedirects;
5093
- }
5094
- }), activateRoutes(this.rootContexts, this.routeReuseStrategy, (evt) => this.triggerEvent(evt)), tap({
5095
- next() {
5096
- completed = true;
5097
- },
5098
- complete() {
5099
- completed = true;
5100
- }
5101
- }), finalize(() => {
5102
- var _a;
5103
- /* When the navigation stream finishes either through error or success,
5104
- * we set the `completed` or `errored` flag. However, there are some
5105
- * situations where we could get here without either of those being set.
5106
- * For instance, a redirect during NavigationStart. Therefore, this is a
5107
- * catch-all to make sure the NavigationCancel event is fired when a
5108
- * navigation gets cancelled but not caught by other means. */
5109
- if (!completed && !errored) {
5110
- const cancelationReason = NG_DEV_MODE$2 ?
5111
- `Navigation ID ${overallTransitionState
5112
- .id} is not equal to the current navigation id ${this.navigationId}` :
5113
- '';
5114
- this.cancelNavigationTransition(overallTransitionState, cancelationReason, 1 /* NavigationCancellationCode.SupersededByNewNavigation */);
5115
- }
5116
- // Only clear current navigation if it is still set to the one that
5117
- // finalized.
5118
- if (((_a = this.currentNavigation) === null || _a === void 0 ? void 0 : _a.id) === overallTransitionState.id) {
5119
- this.currentNavigation = null;
5120
- }
5121
- }), catchError((e) => {
5122
- var _a;
5123
- errored = true;
5124
- /* This error type is issued during Redirect, and is handled as a
5125
- * cancellation rather than an error. */
5126
- if (isNavigationCancelingError$1(e)) {
5127
- if (!isRedirectingNavigationCancelingError$1(e)) {
5128
- // Set property only if we're not redirecting. If we landed on a page
5129
- // and redirect to `/` route, the new navigation is going to see the
5130
- // `/` isn't a change from the default currentUrlTree and won't
5131
- // navigate. This is only applicable with initial navigation, so
5132
- // setting `navigated` only when not redirecting resolves this
5133
- // scenario.
5134
- this.navigated = true;
5135
- this.restoreHistory(overallTransitionState, true);
5136
- }
5137
- const navCancel = new NavigationCancel(overallTransitionState.id, this.serializeUrl(overallTransitionState.extractedUrl), e.message, e.cancellationCode);
5138
- eventsSubject.next(navCancel);
5139
- // When redirecting, we need to delay resolving the navigation
5140
- // promise and push it to the redirect navigation
5141
- if (!isRedirectingNavigationCancelingError$1(e)) {
5142
- overallTransitionState.resolve(false);
5143
- }
5144
- else {
5145
- const mergedTree = this.urlHandlingStrategy.merge(e.url, this.rawUrlTree);
5146
- const extras = {
5147
- skipLocationChange: overallTransitionState.extras.skipLocationChange,
5148
- // The URL is already updated at this point if we have 'eager' URL
5149
- // updates or if the navigation was triggered by the browser (back
5150
- // button, URL bar, etc). We want to replace that item in history
5151
- // if the navigation is rejected.
5152
- replaceUrl: this.urlUpdateStrategy === 'eager' ||
5153
- isBrowserTriggeredNavigation(overallTransitionState.source)
5154
- };
5155
- this.scheduleNavigation(mergedTree, 'imperative', null, extras, {
5156
- resolve: overallTransitionState.resolve,
5157
- reject: overallTransitionState.reject,
5158
- promise: overallTransitionState.promise
5159
- });
5160
- }
5161
- /* All other errors should reset to the router's internal URL reference
5162
- * to the pre-error state. */
5163
- }
5164
- else {
5165
- this.restoreHistory(overallTransitionState, true);
5166
- const navError = new NavigationError(overallTransitionState.id, this.serializeUrl(overallTransitionState.extractedUrl), e, (_a = overallTransitionState.targetSnapshot) !== null && _a !== void 0 ? _a : undefined);
5167
- eventsSubject.next(navError);
5168
- try {
5169
- overallTransitionState.resolve(this.errorHandler(e));
5170
- }
5171
- catch (ee) {
5172
- overallTransitionState.reject(ee);
5173
- }
5174
- }
5175
- return EMPTY;
5176
- }));
5177
- // TODO(jasonaden): remove cast once g3 is on updated TypeScript
5178
- }));
5179
- }
5180
5225
  /**
5181
5226
  * @internal
5182
5227
  * TODO: this should be removed once the constructor of the router made internal
@@ -5217,11 +5262,18 @@ class Router {
5217
5262
  setTimeout(() => {
5218
5263
  var _a;
5219
5264
  const extras = { replaceUrl: true };
5220
- // Navigations coming from Angular router have a navigationId state
5221
- // property. When this exists, restore the state.
5222
- const state = ((_a = event.state) === null || _a === void 0 ? void 0 : _a.navigationId) ? event.state : null;
5223
- if (state) {
5224
- const stateCopy = Object.assign({}, state);
5265
+ // TODO: restoredState should always include the entire state, regardless
5266
+ // of navigationId. This requires a breaking change to update the type on
5267
+ // NavigationStart’s restoredState, which currently requires navigationId
5268
+ // to always be present. The Router used to only restore history state if
5269
+ // a navigationId was present.
5270
+ // The stored navigationId is used by the RouterScroller to retrieve the scroll
5271
+ // position for the page.
5272
+ const restoredState = ((_a = event.state) === null || _a === void 0 ? void 0 : _a.navigationId) ? event.state : null;
5273
+ // Separate to NavigationStart.restoredState, we must also restore the state to
5274
+ // history.state and generate a new navigationId, since it will be overwritten
5275
+ if (event.state) {
5276
+ const stateCopy = Object.assign({}, event.state);
5225
5277
  delete stateCopy.navigationId;
5226
5278
  delete stateCopy.ɵrouterPageId;
5227
5279
  if (Object.keys(stateCopy).length !== 0) {
@@ -5229,7 +5281,7 @@ class Router {
5229
5281
  }
5230
5282
  }
5231
5283
  const urlTree = this.parseUrl(event['url']);
5232
- this.scheduleNavigation(urlTree, source, state, extras);
5284
+ this.scheduleNavigation(urlTree, source, restoredState, extras);
5233
5285
  }, 0);
5234
5286
  }
5235
5287
  });
@@ -5244,7 +5296,7 @@ class Router {
5244
5296
  * and `null` when idle.
5245
5297
  */
5246
5298
  getCurrentNavigation() {
5247
- return this.currentNavigation;
5299
+ return this.navigationTransitions.currentNavigation;
5248
5300
  }
5249
5301
  /** @internal */
5250
5302
  triggerEvent(event) {
@@ -5471,13 +5523,14 @@ class Router {
5471
5523
  this.currentPageId = t.targetPageId;
5472
5524
  this.events
5473
5525
  .next(new NavigationEnd(t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(this.currentUrlTree)));
5474
- this.lastSuccessfulNavigation = this.currentNavigation;
5526
+ this.lastSuccessfulNavigation = this.getCurrentNavigation();
5475
5527
  (_a = this.titleStrategy) === null || _a === void 0 ? void 0 : _a.updateTitle(this.routerState.snapshot);
5476
5528
  t.resolve(true);
5477
5529
  }, e => {
5478
5530
  this.console.warn(`Unhandled Navigation Error: ${e}`);
5479
5531
  });
5480
5532
  }
5533
+ /** @internal */
5481
5534
  scheduleNavigation(rawUrl, source, restoredState, extras, priorPromise) {
5482
5535
  var _a, _b;
5483
5536
  if (this.disposed) {
@@ -5531,7 +5584,6 @@ class Router {
5531
5584
  source,
5532
5585
  restoredState,
5533
5586
  currentUrlTree: this.currentUrlTree,
5534
- currentRawUrl: this.rawUrlTree,
5535
5587
  rawUrl,
5536
5588
  extras,
5537
5589
  resolve,
@@ -5546,10 +5598,11 @@ class Router {
5546
5598
  return Promise.reject(e);
5547
5599
  });
5548
5600
  }
5549
- setBrowserUrl(url, t) {
5601
+ /** @internal */
5602
+ setBrowserUrl(url, transition) {
5550
5603
  const path = this.urlSerializer.serialize(url);
5551
- const state = Object.assign(Object.assign({}, t.extras.state), this.generateNgRouterState(t.id, t.targetPageId));
5552
- if (this.location.isCurrentPathEqualTo(path) || !!t.extras.replaceUrl) {
5604
+ const state = Object.assign(Object.assign({}, transition.extras.state), this.generateNgRouterState(transition.id, transition.targetPageId));
5605
+ if (this.location.isCurrentPathEqualTo(path) || !!transition.extras.replaceUrl) {
5553
5606
  this.location.replaceState(path, '', state);
5554
5607
  }
5555
5608
  else {
@@ -5559,29 +5612,31 @@ class Router {
5559
5612
  /**
5560
5613
  * Performs the necessary rollback action to restore the browser URL to the
5561
5614
  * state before the transition.
5615
+ * @internal
5562
5616
  */
5563
- restoreHistory(t, restoringFromCaughtError = false) {
5617
+ restoreHistory(transition, restoringFromCaughtError = false) {
5564
5618
  var _a, _b;
5565
5619
  if (this.canceledNavigationResolution === 'computed') {
5566
- const targetPagePosition = this.currentPageId - t.targetPageId;
5620
+ const targetPagePosition = this.currentPageId - transition.targetPageId;
5567
5621
  // The navigator change the location before triggered the browser event,
5568
5622
  // so we need to go back to the current url if the navigation is canceled.
5569
5623
  // Also, when navigation gets cancelled while using url update strategy eager, then we need to
5570
5624
  // go back. Because, when `urlUpdateStrategy` is `eager`; `setBrowserUrl` method is called
5571
5625
  // before any verification.
5572
- const browserUrlUpdateOccurred = (t.source === 'popstate' || this.urlUpdateStrategy === 'eager' ||
5573
- this.currentUrlTree === ((_a = this.currentNavigation) === null || _a === void 0 ? void 0 : _a.finalUrl));
5626
+ const browserUrlUpdateOccurred = (transition.source === 'popstate' || this.urlUpdateStrategy === 'eager' ||
5627
+ this.currentUrlTree === ((_a = this.getCurrentNavigation()) === null || _a === void 0 ? void 0 : _a.finalUrl));
5574
5628
  if (browserUrlUpdateOccurred && targetPagePosition !== 0) {
5575
5629
  this.location.historyGo(targetPagePosition);
5576
5630
  }
5577
- else if (this.currentUrlTree === ((_b = this.currentNavigation) === null || _b === void 0 ? void 0 : _b.finalUrl) && targetPagePosition === 0) {
5631
+ else if (this.currentUrlTree === ((_b = this.getCurrentNavigation()) === null || _b === void 0 ? void 0 : _b.finalUrl) &&
5632
+ targetPagePosition === 0) {
5578
5633
  // We got to the activation stage (where currentUrlTree is set to the navigation's
5579
5634
  // finalUrl), but we weren't moving anywhere in history (skipLocationChange or replaceUrl).
5580
5635
  // We still need to reset the router state back to what it was when the navigation started.
5581
- this.resetState(t);
5636
+ this.resetState(transition);
5582
5637
  // TODO(atscott): resetting the `browserUrlTree` should really be done in `resetState`.
5583
5638
  // Investigate if this can be done by running TGP.
5584
- this.browserUrlTree = t.currentUrlTree;
5639
+ this.browserUrlTree = transition.currentUrlTree;
5585
5640
  this.resetUrlToCurrentUrlTree();
5586
5641
  }
5587
5642
  else {
@@ -5595,7 +5650,7 @@ class Router {
5595
5650
  // reject. For 'eager' navigations, it seems like we also really should reset the state
5596
5651
  // because the navigation was cancelled. Investigate if this can be done by running TGP.
5597
5652
  if (restoringFromCaughtError) {
5598
- this.resetState(t);
5653
+ this.resetState(transition);
5599
5654
  }
5600
5655
  this.resetUrlToCurrentUrlTree();
5601
5656
  }
@@ -5613,10 +5668,11 @@ class Router {
5613
5668
  resetUrlToCurrentUrlTree() {
5614
5669
  this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree), '', this.generateNgRouterState(this.lastSuccessfulId, this.currentPageId));
5615
5670
  }
5616
- cancelNavigationTransition(t, reason, code) {
5617
- const navCancel = new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), reason, code);
5671
+ /** @internal */
5672
+ cancelNavigationTransition(transition, reason, code) {
5673
+ const navCancel = new NavigationCancel(transition.id, this.serializeUrl(transition.extractedUrl), reason, code);
5618
5674
  this.triggerEvent(navCancel);
5619
- t.resolve(false);
5675
+ transition.resolve(false);
5620
5676
  }
5621
5677
  generateNgRouterState(navigationId, routerPageId) {
5622
5678
  if (this.canceledNavigationResolution === 'computed') {
@@ -5625,9 +5681,9 @@ class Router {
5625
5681
  return { navigationId };
5626
5682
  }
5627
5683
  }
5628
- Router.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: Router, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
5629
- Router.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: Router, providedIn: 'root', useFactory: setupRouter });
5630
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: Router, decorators: [{
5684
+ Router.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: Router, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
5685
+ Router.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: Router, providedIn: 'root', useFactory: setupRouter });
5686
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: Router, decorators: [{
5631
5687
  type: Injectable,
5632
5688
  args: [{
5633
5689
  providedIn: 'root',
@@ -5642,9 +5698,6 @@ function validateCommands(commands) {
5642
5698
  }
5643
5699
  }
5644
5700
  }
5645
- function isBrowserTriggeredNavigation(source) {
5646
- return source !== 'imperative';
5647
- }
5648
5701
 
5649
5702
  /**
5650
5703
  * @description
@@ -5921,9 +5974,9 @@ class RouterLink {
5921
5974
  });
5922
5975
  }
5923
5976
  }
5924
- RouterLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: RouterLink, deps: [{ token: Router }, { token: ActivatedRoute }, { token: 'tabindex', attribute: true }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i3.LocationStrategy }], target: i0.ɵɵFactoryTarget.Directive });
5925
- RouterLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-rc.4", type: RouterLink, isStandalone: true, selector: "[routerLink]", inputs: { target: "target", queryParams: "queryParams", fragment: "fragment", queryParamsHandling: "queryParamsHandling", state: "state", relativeTo: "relativeTo", preserveFragment: "preserveFragment", skipLocationChange: "skipLocationChange", replaceUrl: "replaceUrl", routerLink: "routerLink" }, host: { listeners: { "click": "onClick($event.button,$event.ctrlKey,$event.shiftKey,$event.altKey,$event.metaKey)" }, properties: { "attr.target": "this.target" } }, usesOnChanges: true, ngImport: i0 });
5926
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: RouterLink, decorators: [{
5977
+ RouterLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: RouterLink, deps: [{ token: Router }, { token: ActivatedRoute }, { token: 'tabindex', attribute: true }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i3.LocationStrategy }], target: i0.ɵɵFactoryTarget.Directive });
5978
+ RouterLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.1", type: RouterLink, isStandalone: true, selector: "[routerLink]", inputs: { target: "target", queryParams: "queryParams", fragment: "fragment", queryParamsHandling: "queryParamsHandling", state: "state", relativeTo: "relativeTo", preserveFragment: "preserveFragment", skipLocationChange: "skipLocationChange", replaceUrl: "replaceUrl", routerLink: "routerLink" }, host: { listeners: { "click": "onClick($event.button,$event.ctrlKey,$event.shiftKey,$event.altKey,$event.metaKey)" }, properties: { "attr.target": "this.target" } }, usesOnChanges: true, ngImport: i0 });
5979
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: RouterLink, decorators: [{
5927
5980
  type: Directive,
5928
5981
  args: [{
5929
5982
  selector: '[routerLink]',
@@ -6152,9 +6205,9 @@ class RouterLinkActive {
6152
6205
  return this.link && isActiveCheckFn(this.link) || this.links.some(isActiveCheckFn);
6153
6206
  }
6154
6207
  }
6155
- RouterLinkActive.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: RouterLinkActive, deps: [{ token: Router }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: RouterLink, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
6156
- RouterLinkActive.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-rc.4", type: RouterLinkActive, isStandalone: true, selector: "[routerLinkActive]", inputs: { routerLinkActiveOptions: "routerLinkActiveOptions", ariaCurrentWhenActive: "ariaCurrentWhenActive", routerLinkActive: "routerLinkActive" }, outputs: { isActiveChange: "isActiveChange" }, queries: [{ propertyName: "links", predicate: RouterLink, descendants: true }], exportAs: ["routerLinkActive"], usesOnChanges: true, ngImport: i0 });
6157
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: RouterLinkActive, decorators: [{
6208
+ RouterLinkActive.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: RouterLinkActive, deps: [{ token: Router }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: RouterLink, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
6209
+ RouterLinkActive.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.1", type: RouterLinkActive, isStandalone: true, selector: "[routerLinkActive]", inputs: { routerLinkActiveOptions: "routerLinkActiveOptions", ariaCurrentWhenActive: "ariaCurrentWhenActive", routerLinkActive: "routerLinkActive" }, outputs: { isActiveChange: "isActiveChange" }, queries: [{ propertyName: "links", predicate: RouterLink, descendants: true }], exportAs: ["routerLinkActive"], usesOnChanges: true, ngImport: i0 });
6210
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: RouterLinkActive, decorators: [{
6158
6211
  type: Directive,
6159
6212
  args: [{
6160
6213
  selector: '[routerLinkActive]',
@@ -6216,9 +6269,9 @@ class PreloadAllModules {
6216
6269
  return fn().pipe(catchError(() => of(null)));
6217
6270
  }
6218
6271
  }
6219
- PreloadAllModules.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: PreloadAllModules, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6220
- PreloadAllModules.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: PreloadAllModules, providedIn: 'root' });
6221
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: PreloadAllModules, decorators: [{
6272
+ PreloadAllModules.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: PreloadAllModules, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6273
+ PreloadAllModules.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: PreloadAllModules, providedIn: 'root' });
6274
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: PreloadAllModules, decorators: [{
6222
6275
  type: Injectable,
6223
6276
  args: [{ providedIn: 'root' }]
6224
6277
  }] });
@@ -6236,9 +6289,9 @@ class NoPreloading {
6236
6289
  return of(null);
6237
6290
  }
6238
6291
  }
6239
- NoPreloading.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: NoPreloading, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6240
- NoPreloading.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: NoPreloading, providedIn: 'root' });
6241
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: NoPreloading, decorators: [{
6292
+ NoPreloading.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: NoPreloading, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6293
+ NoPreloading.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: NoPreloading, providedIn: 'root' });
6294
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: NoPreloading, decorators: [{
6242
6295
  type: Injectable,
6243
6296
  args: [{ providedIn: 'root' }]
6244
6297
  }] });
@@ -6334,9 +6387,9 @@ class RouterPreloader {
6334
6387
  });
6335
6388
  }
6336
6389
  }
6337
- RouterPreloader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: RouterPreloader, deps: [{ token: Router }, { token: i0.Compiler }, { token: i0.EnvironmentInjector }, { token: PreloadingStrategy }, { token: RouterConfigLoader }], target: i0.ɵɵFactoryTarget.Injectable });
6338
- RouterPreloader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: RouterPreloader, providedIn: 'root' });
6339
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: RouterPreloader, decorators: [{
6390
+ RouterPreloader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: RouterPreloader, deps: [{ token: Router }, { token: i0.Compiler }, { token: i0.EnvironmentInjector }, { token: PreloadingStrategy }, { token: RouterConfigLoader }], target: i0.ɵɵFactoryTarget.Injectable });
6391
+ RouterPreloader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: RouterPreloader, providedIn: 'root' });
6392
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: RouterPreloader, decorators: [{
6340
6393
  type: Injectable,
6341
6394
  args: [{ providedIn: 'root' }]
6342
6395
  }], ctorParameters: function () { return [{ type: Router }, { type: i0.Compiler }, { type: i0.EnvironmentInjector }, { type: PreloadingStrategy }, { type: RouterConfigLoader }]; } });
@@ -6427,9 +6480,9 @@ class RouterScroller {
6427
6480
  }
6428
6481
  }
6429
6482
  }
6430
- RouterScroller.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: RouterScroller, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
6431
- RouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: RouterScroller });
6432
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: RouterScroller, decorators: [{
6483
+ RouterScroller.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: RouterScroller, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
6484
+ RouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: RouterScroller });
6485
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: RouterScroller, decorators: [{
6433
6486
  type: Injectable
6434
6487
  }], ctorParameters: function () { return [{ type: Router }, { type: i3.ViewportScroller }, { type: i0.NgZone }, { type: undefined }]; } });
6435
6488
 
@@ -6592,8 +6645,10 @@ function getBootstrapListener() {
6592
6645
  (_a = injector.get(ROUTER_PRELOADER, null, InjectFlags.Optional)) === null || _a === void 0 ? void 0 : _a.setUpPreloading();
6593
6646
  (_b = injector.get(ROUTER_SCROLLER, null, InjectFlags.Optional)) === null || _b === void 0 ? void 0 : _b.init();
6594
6647
  router.resetRootComponentType(ref.componentTypes[0]);
6595
- bootstrapDone.next();
6596
- bootstrapDone.complete();
6648
+ if (!bootstrapDone.closed) {
6649
+ bootstrapDone.next();
6650
+ bootstrapDone.unsubscribe();
6651
+ }
6597
6652
  };
6598
6653
  }
6599
6654
  /**
@@ -6641,7 +6696,6 @@ function withEnabledBlockingInitialNavigation() {
6641
6696
  deps: [Injector],
6642
6697
  useFactory: (injector) => {
6643
6698
  const locationInitialized = injector.get(LOCATION_INITIALIZED, Promise.resolve());
6644
- let initNavigation = false;
6645
6699
  /**
6646
6700
  * Performs the given action once the router finishes its next/current navigation.
6647
6701
  *
@@ -6676,21 +6730,13 @@ function withEnabledBlockingInitialNavigation() {
6676
6730
  // Unblock APP_INITIALIZER in case the initial navigation was canceled or errored
6677
6731
  // without a redirect.
6678
6732
  resolve(true);
6679
- initNavigation = true;
6680
6733
  });
6681
6734
  router.afterPreactivation = () => {
6682
6735
  // Unblock APP_INITIALIZER once we get to `afterPreactivation`. At this point, we
6683
6736
  // assume activation will complete successfully (even though this is not
6684
6737
  // guaranteed).
6685
6738
  resolve(true);
6686
- // only the initial navigation should be delayed until bootstrapping is done.
6687
- if (!initNavigation) {
6688
- return bootstrapDone.closed ? of(void 0) : bootstrapDone;
6689
- // subsequent navigations should not be delayed
6690
- }
6691
- else {
6692
- return of(void 0);
6693
- }
6739
+ return bootstrapDone.closed ? of(void 0) : bootstrapDone;
6694
6740
  };
6695
6741
  router.initialNavigation();
6696
6742
  });
@@ -6980,10 +7026,10 @@ class RouterModule {
6980
7026
  };
6981
7027
  }
6982
7028
  }
6983
- RouterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: RouterModule, deps: [{ token: ROUTER_FORROOT_GUARD, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
6984
- RouterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.0-rc.4", ngImport: i0, type: RouterModule, imports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent], exports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent] });
6985
- RouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: RouterModule, imports: [ɵEmptyOutletComponent] });
6986
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.4", ngImport: i0, type: RouterModule, decorators: [{
7029
+ RouterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: RouterModule, deps: [{ token: ROUTER_FORROOT_GUARD, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
7030
+ RouterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.1", ngImport: i0, type: RouterModule, imports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent], exports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent] });
7031
+ RouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: RouterModule, imports: [ɵEmptyOutletComponent] });
7032
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: RouterModule, decorators: [{
6987
7033
  type: NgModule,
6988
7034
  args: [{
6989
7035
  imports: ROUTER_DIRECTIVES,
@@ -7070,7 +7116,7 @@ function provideRouterInitializer() {
7070
7116
  /**
7071
7117
  * @publicApi
7072
7118
  */
7073
- const VERSION = new Version('15.0.0-rc.4');
7119
+ const VERSION = new Version('15.0.1');
7074
7120
 
7075
7121
  /**
7076
7122
  * @license