@angular/router 14.1.0 → 14.2.0-next.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/apply_redirects.mjs +4 -3
  2. package/esm2020/src/components/empty_outlet.mjs +10 -6
  3. package/esm2020/src/directives/router_link.mjs +12 -9
  4. package/esm2020/src/directives/router_link_active.mjs +5 -4
  5. package/esm2020/src/directives/router_outlet.mjs +9 -5
  6. package/esm2020/src/index.mjs +4 -3
  7. package/esm2020/src/models.mjs +1 -1
  8. package/esm2020/src/operators/check_guards.mjs +36 -26
  9. package/esm2020/src/operators/resolve_data.mjs +22 -23
  10. package/esm2020/src/page_title_strategy.mjs +9 -10
  11. package/esm2020/src/private_export.mjs +3 -2
  12. package/esm2020/src/recognize.mjs +4 -3
  13. package/esm2020/src/router.mjs +62 -9
  14. package/esm2020/src/router_config.mjs +19 -0
  15. package/esm2020/src/router_config_loader.mjs +6 -5
  16. package/esm2020/src/router_module.mjs +22 -79
  17. package/esm2020/src/router_outlet_context.mjs +9 -1
  18. package/esm2020/src/router_preloader.mjs +19 -11
  19. package/esm2020/src/router_scroller.mjs +3 -3
  20. package/esm2020/src/router_state.mjs +7 -3
  21. package/esm2020/src/shared.mjs +22 -2
  22. package/esm2020/src/url_tree.mjs +9 -2
  23. package/esm2020/src/utils/preactivation.mjs +16 -6
  24. package/esm2020/src/utils/type_guards.mjs +5 -1
  25. package/esm2020/src/version.mjs +1 -1
  26. package/esm2020/testing/src/router_testing_module.mjs +4 -4
  27. package/fesm2015/router.mjs +381 -277
  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 +365 -275
  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 +119 -77
  36. package/package.json +4 -4
  37. package/testing/index.d.ts +1 -1
  38. package/upgrade/index.d.ts +1 -1
@@ -1,15 +1,15 @@
1
1
  /**
2
- * @license Angular v14.1.0
2
+ * @license Angular v14.2.0-next.1
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
6
 
7
7
  import * as i0 from '@angular/core';
8
- import { ɵisObservable, ɵisPromise, ɵRuntimeError, EventEmitter, Directive, Attribute, Output, Component, createEnvironmentInjector, ɵisStandalone, ComponentFactoryResolver, InjectionToken, InjectFlags, NgModuleFactory, Injectable, NgModuleRef, ɵConsole, NgZone, ɵcoerceToBoolean, Input, HostListener, HostBinding, Optional, ContentChildren, inject, Injector, Compiler, NgProbeToken, ANALYZE_FOR_ENTRY_COMPONENTS, SkipSelf, APP_INITIALIZER, APP_BOOTSTRAP_LISTENER, NgModule, Inject, ApplicationRef, ENVIRONMENT_INITIALIZER, Version } from '@angular/core';
9
- import { from, of, BehaviorSubject, combineLatest, concat, defer, pipe, throwError, EmptyError, Observable, EMPTY, ConnectableObservable, Subject } from 'rxjs';
10
- import { map, switchMap, take, startWith, filter, mergeMap, first, concatMap, tap, catchError, scan, last as last$1, takeWhile, defaultIfEmpty, takeLast, mapTo, finalize, refCount, mergeAll } from 'rxjs/operators';
8
+ import { ɵisObservable, ɵisPromise, Injectable, ɵRuntimeError, EventEmitter, Directive, Attribute, Output, Component, createEnvironmentInjector, ɵisStandalone, ComponentFactoryResolver, ɵisInjectable, inject, InjectionToken, InjectFlags, NgModuleFactory, Injector, Compiler, NgModuleRef, ɵConsole, NgZone, ɵcoerceToBoolean, Input, HostListener, HostBinding, Optional, ContentChildren, NgProbeToken, SkipSelf, NgModule, Inject, ApplicationRef, APP_BOOTSTRAP_LISTENER, APP_INITIALIZER, ENVIRONMENT_INITIALIZER, Version } from '@angular/core';
9
+ import { from, of, BehaviorSubject, EmptyError, combineLatest, concat, defer, pipe, throwError, Observable, EMPTY, ConnectableObservable, Subject } from 'rxjs';
11
10
  import * as i3 from '@angular/common';
12
- import { Location, LocationStrategy, HashLocationStrategy, PathLocationStrategy, ViewportScroller, LOCATION_INITIALIZED } from '@angular/common';
11
+ import { Location, ViewportScroller, LocationStrategy, HashLocationStrategy, PathLocationStrategy, LOCATION_INITIALIZED } from '@angular/common';
12
+ import { map, switchMap, take, startWith, filter, mergeMap, first, concatMap, tap, catchError, scan, last as last$1, takeWhile, defaultIfEmpty, takeLast, mapTo, finalize, refCount, mergeAll } from 'rxjs/operators';
13
13
  import * as i1 from '@angular/platform-browser';
14
14
 
15
15
  /**
@@ -25,6 +25,12 @@ import * as i1 from '@angular/platform-browser';
25
25
  * @publicApi
26
26
  */
27
27
  const PRIMARY_OUTLET = 'primary';
28
+ /**
29
+ * A private symbol used to store the value of `Route.title` inside the `Route.data` if it is a
30
+ * static string or `Route.resolve` if anything else. This allows us to reuse the existing route
31
+ * data/resolvers to support the title feature without new instrumentation in the `Router` pipeline.
32
+ */
33
+ const RouteTitleKey = Symbol('RouteTitle');
28
34
  class ParamsAsMap {
29
35
  constructor(params) {
30
36
  this.params = params || {};
@@ -60,7 +66,21 @@ class ParamsAsMap {
60
66
  function convertToParamMap(params) {
61
67
  return new ParamsAsMap(params);
62
68
  }
63
- // Matches the route configuration (`route`) against the actual URL (`segments`).
69
+ /**
70
+ * Matches the route configuration (`route`) against the actual URL (`segments`).
71
+ *
72
+ * When no matcher is defined on a `Route`, this is the matcher used by the Router by default.
73
+ *
74
+ * @param segments The remaining unmatched segments in the current navigation
75
+ * @param segmentGroup The current segment group being matched
76
+ * @param route The `Route` to match against.
77
+ *
78
+ * @see UrlMatchResult
79
+ * @see Route
80
+ *
81
+ * @returns The resulting match information or `null` if the `route` should not match.
82
+ * @publicApi
83
+ */
64
84
  function defaultUrlMatcher(segments, segmentGroup, route) {
65
85
  const parts = route.path.split('/');
66
86
  if (parts.length > segments.length) {
@@ -182,7 +202,7 @@ function wrapIntoObservable(value) {
182
202
  * Use of this source code is governed by an MIT-style license that can be
183
203
  * found in the LICENSE file at https://angular.io/license
184
204
  */
185
- const NG_DEV_MODE$7 = typeof ngDevMode === 'undefined' || ngDevMode;
205
+ const NG_DEV_MODE$8 = typeof ngDevMode === 'undefined' || ngDevMode;
186
206
  function createEmptyUrlTree() {
187
207
  return new UrlTree(new UrlSegmentGroup([], {}), {}, null);
188
208
  }
@@ -439,6 +459,12 @@ function mapChildrenIntoArray(segment, fn) {
439
459
  */
440
460
  class UrlSerializer {
441
461
  }
462
+ UrlSerializer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: UrlSerializer, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
463
+ UrlSerializer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: UrlSerializer, providedIn: 'root', useFactory: () => new DefaultUrlSerializer() });
464
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: UrlSerializer, decorators: [{
465
+ type: Injectable,
466
+ args: [{ providedIn: 'root', useFactory: () => new DefaultUrlSerializer() }]
467
+ }] });
442
468
  /**
443
469
  * @description
444
470
  *
@@ -647,7 +673,7 @@ class UrlParser {
647
673
  parseSegment() {
648
674
  const path = matchSegments(this.remaining);
649
675
  if (path === '' && this.peekStartsWith(';')) {
650
- throw new ɵRuntimeError(4009 /* RuntimeErrorCode.EMPTY_PATH_WITH_PARAMS */, NG_DEV_MODE$7 && `Empty path url segment cannot have parameters: '${this.remaining}'.`);
676
+ throw new ɵRuntimeError(4009 /* RuntimeErrorCode.EMPTY_PATH_WITH_PARAMS */, NG_DEV_MODE$8 && `Empty path url segment cannot have parameters: '${this.remaining}'.`);
651
677
  }
652
678
  this.capture(path);
653
679
  return new UrlSegment(decode(path), this.parseMatrixParams());
@@ -716,7 +742,7 @@ class UrlParser {
716
742
  // if is is not one of these characters, then the segment was unescaped
717
743
  // or the group was not closed
718
744
  if (next !== '/' && next !== ')' && next !== ';') {
719
- throw new ɵRuntimeError(4010 /* RuntimeErrorCode.UNPARSABLE_URL */, NG_DEV_MODE$7 && `Cannot parse url '${this.url}'`);
745
+ throw new ɵRuntimeError(4010 /* RuntimeErrorCode.UNPARSABLE_URL */, NG_DEV_MODE$8 && `Cannot parse url '${this.url}'`);
720
746
  }
721
747
  let outletName = undefined;
722
748
  if (path.indexOf(':') > -1) {
@@ -747,7 +773,7 @@ class UrlParser {
747
773
  }
748
774
  capture(str) {
749
775
  if (!this.consumeOptional(str)) {
750
- throw new ɵRuntimeError(4011 /* RuntimeErrorCode.UNEXPECTED_VALUE_IN_URL */, NG_DEV_MODE$7 && `Expected "${str}".`);
776
+ throw new ɵRuntimeError(4011 /* RuntimeErrorCode.UNEXPECTED_VALUE_IN_URL */, NG_DEV_MODE$8 && `Expected "${str}".`);
751
777
  }
752
778
  }
753
779
  }
@@ -800,7 +826,7 @@ function isUrlTree(v) {
800
826
  * Use of this source code is governed by an MIT-style license that can be
801
827
  * found in the LICENSE file at https://angular.io/license
802
828
  */
803
- const NG_DEV_MODE$6 = typeof ngDevMode === 'undefined' || ngDevMode;
829
+ const NG_DEV_MODE$7 = typeof ngDevMode === 'undefined' || ngDevMode;
804
830
  /**
805
831
  * Creates a `UrlTree` relative to an `ActivatedRouteSnapshot`.
806
832
  *
@@ -978,11 +1004,11 @@ class Navigation {
978
1004
  this.numberOfDoubleDots = numberOfDoubleDots;
979
1005
  this.commands = commands;
980
1006
  if (isAbsolute && commands.length > 0 && isMatrixParams(commands[0])) {
981
- throw new ɵRuntimeError(4003 /* RuntimeErrorCode.ROOT_SEGMENT_MATRIX_PARAMS */, NG_DEV_MODE$6 && 'Root segment cannot have matrix parameters');
1007
+ throw new ɵRuntimeError(4003 /* RuntimeErrorCode.ROOT_SEGMENT_MATRIX_PARAMS */, NG_DEV_MODE$7 && 'Root segment cannot have matrix parameters');
982
1008
  }
983
1009
  const cmdWithOutlet = commands.find(isCommandWithOutlets);
984
1010
  if (cmdWithOutlet && cmdWithOutlet !== last(commands)) {
985
- throw new ɵRuntimeError(4004 /* RuntimeErrorCode.MISPLACED_OUTLETS_COMMAND */, NG_DEV_MODE$6 && '{outlets:{}} has to be the last command');
1011
+ throw new ɵRuntimeError(4004 /* RuntimeErrorCode.MISPLACED_OUTLETS_COMMAND */, NG_DEV_MODE$7 && '{outlets:{}} has to be the last command');
986
1012
  }
987
1013
  }
988
1014
  toRoot() {
@@ -1081,7 +1107,7 @@ function createPositionApplyingDoubleDots(group, index, numberOfDoubleDots) {
1081
1107
  dd -= ci;
1082
1108
  g = g.parent;
1083
1109
  if (!g) {
1084
- throw new ɵRuntimeError(4005 /* RuntimeErrorCode.INVALID_DOUBLE_DOTS */, NG_DEV_MODE$6 && 'Invalid number of \'../\'');
1110
+ throw new ɵRuntimeError(4005 /* RuntimeErrorCode.INVALID_DOUBLE_DOTS */, NG_DEV_MODE$7 && 'Invalid number of \'../\'');
1085
1111
  }
1086
1112
  ci = g.segments.length;
1087
1113
  }
@@ -1905,6 +1931,7 @@ class ActivatedRoute {
1905
1931
  outlet,
1906
1932
  /** The component of the route, a constant. */
1907
1933
  component, futureSnapshot) {
1934
+ var _a, _b;
1908
1935
  this.url = url;
1909
1936
  this.params = params;
1910
1937
  this.queryParams = queryParams;
@@ -1912,6 +1939,8 @@ class ActivatedRoute {
1912
1939
  this.data = data;
1913
1940
  this.outlet = outlet;
1914
1941
  this.component = component;
1942
+ /** An Observable of the resolved route title */
1943
+ this.title = (_b = (_a = this.data) === null || _a === void 0 ? void 0 : _a.pipe(map((d) => d[RouteTitleKey]))) !== null && _b !== void 0 ? _b : of(undefined);
1915
1944
  this._futureSnapshot = futureSnapshot;
1916
1945
  }
1917
1946
  /** The configuration used to match this route. */
@@ -2060,6 +2089,7 @@ class ActivatedRouteSnapshot {
2060
2089
  outlet,
2061
2090
  /** The component of the route */
2062
2091
  component, routeConfig, urlSegment, lastPathIndex, resolve, correctedLastPathIndex) {
2092
+ var _a;
2063
2093
  this.url = url;
2064
2094
  this.params = params;
2065
2095
  this.queryParams = queryParams;
@@ -2067,6 +2097,8 @@ class ActivatedRouteSnapshot {
2067
2097
  this.data = data;
2068
2098
  this.outlet = outlet;
2069
2099
  this.component = component;
2100
+ /** The resolved route title */
2101
+ this.title = (_a = this.data) === null || _a === void 0 ? void 0 : _a[RouteTitleKey];
2070
2102
  this.routeConfig = routeConfig;
2071
2103
  this._urlSegment = urlSegment;
2072
2104
  this._lastPathIndex = lastPathIndex;
@@ -2356,6 +2388,12 @@ class ChildrenOutletContexts {
2356
2388
  return this.contexts.get(childName) || null;
2357
2389
  }
2358
2390
  }
2391
+ ChildrenOutletContexts.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: ChildrenOutletContexts, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2392
+ ChildrenOutletContexts.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: ChildrenOutletContexts, providedIn: 'root' });
2393
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: ChildrenOutletContexts, decorators: [{
2394
+ type: Injectable,
2395
+ args: [{ providedIn: 'root' }]
2396
+ }] });
2359
2397
 
2360
2398
  /**
2361
2399
  * @license
@@ -2364,7 +2402,7 @@ class ChildrenOutletContexts {
2364
2402
  * Use of this source code is governed by an MIT-style license that can be
2365
2403
  * found in the LICENSE file at https://angular.io/license
2366
2404
  */
2367
- const NG_DEV_MODE$5 = typeof ngDevMode === 'undefined' || ngDevMode;
2405
+ const NG_DEV_MODE$6 = typeof ngDevMode === 'undefined' || ngDevMode;
2368
2406
  /**
2369
2407
  * @description
2370
2408
  *
@@ -2474,12 +2512,12 @@ class RouterOutlet {
2474
2512
  */
2475
2513
  get component() {
2476
2514
  if (!this.activated)
2477
- throw new ɵRuntimeError(4012 /* RuntimeErrorCode.OUTLET_NOT_ACTIVATED */, NG_DEV_MODE$5 && 'Outlet is not activated');
2515
+ throw new ɵRuntimeError(4012 /* RuntimeErrorCode.OUTLET_NOT_ACTIVATED */, NG_DEV_MODE$6 && 'Outlet is not activated');
2478
2516
  return this.activated.instance;
2479
2517
  }
2480
2518
  get activatedRoute() {
2481
2519
  if (!this.activated)
2482
- throw new ɵRuntimeError(4012 /* RuntimeErrorCode.OUTLET_NOT_ACTIVATED */, NG_DEV_MODE$5 && 'Outlet is not activated');
2520
+ throw new ɵRuntimeError(4012 /* RuntimeErrorCode.OUTLET_NOT_ACTIVATED */, NG_DEV_MODE$6 && 'Outlet is not activated');
2483
2521
  return this._activatedRoute;
2484
2522
  }
2485
2523
  get activatedRouteData() {
@@ -2493,7 +2531,7 @@ class RouterOutlet {
2493
2531
  */
2494
2532
  detach() {
2495
2533
  if (!this.activated)
2496
- throw new ɵRuntimeError(4012 /* RuntimeErrorCode.OUTLET_NOT_ACTIVATED */, NG_DEV_MODE$5 && 'Outlet is not activated');
2534
+ throw new ɵRuntimeError(4012 /* RuntimeErrorCode.OUTLET_NOT_ACTIVATED */, NG_DEV_MODE$6 && 'Outlet is not activated');
2497
2535
  this.location.detach();
2498
2536
  const cmp = this.activated;
2499
2537
  this.activated = null;
@@ -2521,7 +2559,7 @@ class RouterOutlet {
2521
2559
  }
2522
2560
  activateWith(activatedRoute, resolverOrInjector) {
2523
2561
  if (this.isActivated) {
2524
- throw new ɵRuntimeError(4013 /* RuntimeErrorCode.OUTLET_ALREADY_ACTIVATED */, NG_DEV_MODE$5 && 'Cannot activate an already activated outlet');
2562
+ throw new ɵRuntimeError(4013 /* RuntimeErrorCode.OUTLET_ALREADY_ACTIVATED */, NG_DEV_MODE$6 && 'Cannot activate an already activated outlet');
2525
2563
  }
2526
2564
  this._activatedRoute = activatedRoute;
2527
2565
  const location = this.location;
@@ -2543,11 +2581,15 @@ class RouterOutlet {
2543
2581
  this.activateEvents.emit(this.activated.instance);
2544
2582
  }
2545
2583
  }
2546
- RouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterOutlet, deps: [{ token: ChildrenOutletContexts }, { token: i0.ViewContainerRef }, { token: 'name', attribute: true }, { token: i0.ChangeDetectorRef }, { token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Directive });
2547
- RouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.0", type: RouterOutlet, selector: "router-outlet", outputs: { activateEvents: "activate", deactivateEvents: "deactivate", attachEvents: "attach", detachEvents: "detach" }, exportAs: ["outlet"], ngImport: i0 });
2548
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterOutlet, decorators: [{
2584
+ RouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: RouterOutlet, deps: [{ token: ChildrenOutletContexts }, { token: i0.ViewContainerRef }, { token: 'name', attribute: true }, { token: i0.ChangeDetectorRef }, { token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Directive });
2585
+ RouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0-next.1", type: RouterOutlet, isStandalone: true, selector: "router-outlet", outputs: { activateEvents: "activate", deactivateEvents: "deactivate", attachEvents: "attach", detachEvents: "detach" }, exportAs: ["outlet"], ngImport: i0 });
2586
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: RouterOutlet, decorators: [{
2549
2587
  type: Directive,
2550
- args: [{ selector: 'router-outlet', exportAs: 'outlet' }]
2588
+ args: [{
2589
+ selector: 'router-outlet',
2590
+ exportAs: 'outlet',
2591
+ standalone: true,
2592
+ }]
2551
2593
  }], ctorParameters: function () {
2552
2594
  return [{ type: ChildrenOutletContexts }, { type: i0.ViewContainerRef }, { type: undefined, decorators: [{
2553
2595
  type: Attribute,
@@ -2604,11 +2646,15 @@ function isComponentFactoryResolver(item) {
2604
2646
  */
2605
2647
  class ɵEmptyOutletComponent {
2606
2648
  }
2607
- ɵEmptyOutletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: ɵEmptyOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2608
- ɵEmptyOutletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: ɵEmptyOutletComponent, selector: "ng-component", ngImport: i0, template: `<router-outlet></router-outlet>`, isInline: true, dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] });
2609
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: ɵEmptyOutletComponent, decorators: [{
2649
+ ɵEmptyOutletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: ɵEmptyOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2650
+ ɵEmptyOutletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0-next.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", outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] });
2651
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: ɵEmptyOutletComponent, decorators: [{
2610
2652
  type: Component,
2611
- args: [{ template: `<router-outlet></router-outlet>` }]
2653
+ args: [{
2654
+ template: `<router-outlet></router-outlet>`,
2655
+ imports: [RouterOutlet],
2656
+ standalone: true,
2657
+ }]
2612
2658
  }] });
2613
2659
 
2614
2660
  /**
@@ -3009,10 +3055,20 @@ function getCanActivateChild(p) {
3009
3055
  return null;
3010
3056
  return { node: p, guards: canActivateChild };
3011
3057
  }
3012
- function getToken(token, snapshot, fallbackInjector) {
3013
- const routeInjector = getClosestRouteInjector(snapshot);
3014
- const injector = routeInjector !== null && routeInjector !== void 0 ? routeInjector : fallbackInjector;
3015
- return injector.get(token);
3058
+ function getTokenOrFunctionIdentity(tokenOrFunction, injector) {
3059
+ const NOT_FOUND = Symbol();
3060
+ const result = injector.get(tokenOrFunction, NOT_FOUND);
3061
+ if (result === NOT_FOUND) {
3062
+ if (typeof tokenOrFunction === 'function' && !ɵisInjectable(tokenOrFunction)) {
3063
+ // We think the token is just a function so return it as-is
3064
+ return tokenOrFunction;
3065
+ }
3066
+ else {
3067
+ // This will throw the not found error
3068
+ return injector.get(tokenOrFunction);
3069
+ }
3070
+ }
3071
+ return result;
3016
3072
  }
3017
3073
  function getChildRouteGuards(futureNode, currNode, contexts, futurePath, checks = {
3018
3074
  canDeactivateChecks: [],
@@ -3166,6 +3222,9 @@ function isRedirectingNavigationCancelingError(error) {
3166
3222
  function isNavigationCancelingError(error) {
3167
3223
  return error && error[NAVIGATION_CANCELING_ERROR];
3168
3224
  }
3225
+ function isEmptyError(e) {
3226
+ return e instanceof EmptyError || (e === null || e === void 0 ? void 0 : e.name) === 'EmptyError';
3227
+ }
3169
3228
 
3170
3229
  /**
3171
3230
  * @license
@@ -3208,28 +3267,28 @@ function prioritizedGuardValue() {
3208
3267
  * Use of this source code is governed by an MIT-style license that can be
3209
3268
  * found in the LICENSE file at https://angular.io/license
3210
3269
  */
3211
- function checkGuards(moduleInjector, forwardEvent) {
3270
+ function checkGuards(injector, forwardEvent) {
3212
3271
  return mergeMap(t => {
3213
3272
  const { targetSnapshot, currentSnapshot, guards: { canActivateChecks, canDeactivateChecks } } = t;
3214
3273
  if (canDeactivateChecks.length === 0 && canActivateChecks.length === 0) {
3215
3274
  return of(Object.assign(Object.assign({}, t), { guardsResult: true }));
3216
3275
  }
3217
- return runCanDeactivateChecks(canDeactivateChecks, targetSnapshot, currentSnapshot, moduleInjector)
3276
+ return runCanDeactivateChecks(canDeactivateChecks, targetSnapshot, currentSnapshot, injector)
3218
3277
  .pipe(mergeMap(canDeactivate => {
3219
3278
  return canDeactivate && isBoolean(canDeactivate) ?
3220
- runCanActivateChecks(targetSnapshot, canActivateChecks, moduleInjector, forwardEvent) :
3279
+ runCanActivateChecks(targetSnapshot, canActivateChecks, injector, forwardEvent) :
3221
3280
  of(canDeactivate);
3222
3281
  }), map(guardsResult => (Object.assign(Object.assign({}, t), { guardsResult }))));
3223
3282
  });
3224
3283
  }
3225
- function runCanDeactivateChecks(checks, futureRSS, currRSS, moduleInjector) {
3226
- return from(checks).pipe(mergeMap(check => runCanDeactivate(check.component, check.route, currRSS, futureRSS, moduleInjector)), first(result => {
3284
+ function runCanDeactivateChecks(checks, futureRSS, currRSS, injector) {
3285
+ return from(checks).pipe(mergeMap(check => runCanDeactivate(check.component, check.route, currRSS, futureRSS, injector)), first(result => {
3227
3286
  return result !== true;
3228
3287
  }, true));
3229
3288
  }
3230
- function runCanActivateChecks(futureSnapshot, checks, moduleInjector, forwardEvent) {
3289
+ function runCanActivateChecks(futureSnapshot, checks, injector, forwardEvent) {
3231
3290
  return from(checks).pipe(concatMap((check) => {
3232
- return concat(fireChildActivationStart(check.route.parent, forwardEvent), fireActivationStart(check.route, forwardEvent), runCanActivateChild(futureSnapshot, check.path, moduleInjector), runCanActivate(futureSnapshot, check.route, moduleInjector));
3291
+ return concat(fireChildActivationStart(check.route.parent, forwardEvent), fireActivationStart(check.route, forwardEvent), runCanActivateChild(futureSnapshot, check.path, injector), runCanActivate(futureSnapshot, check.route, injector));
3233
3292
  }), first(result => {
3234
3293
  return result !== true;
3235
3294
  }, true));
@@ -3262,21 +3321,24 @@ function fireChildActivationStart(snapshot, forwardEvent) {
3262
3321
  }
3263
3322
  return of(true);
3264
3323
  }
3265
- function runCanActivate(futureRSS, futureARS, moduleInjector) {
3324
+ function runCanActivate(futureRSS, futureARS, injector) {
3266
3325
  const canActivate = futureARS.routeConfig ? futureARS.routeConfig.canActivate : null;
3267
3326
  if (!canActivate || canActivate.length === 0)
3268
3327
  return of(true);
3269
- const canActivateObservables = canActivate.map((c) => {
3328
+ const canActivateObservables = canActivate.map((canActivate) => {
3270
3329
  return defer(() => {
3271
- const guard = getToken(c, futureARS, moduleInjector);
3272
- const guardVal = isCanActivate(guard) ? guard.canActivate(futureARS, futureRSS) :
3273
- guard(futureARS, futureRSS);
3330
+ var _a;
3331
+ const closestInjector = (_a = getClosestRouteInjector(futureARS)) !== null && _a !== void 0 ? _a : injector;
3332
+ const guard = getTokenOrFunctionIdentity(canActivate, closestInjector);
3333
+ const guardVal = isCanActivate(guard) ?
3334
+ guard.canActivate(futureARS, futureRSS) :
3335
+ closestInjector.runInContext(() => guard(futureARS, futureRSS));
3274
3336
  return wrapIntoObservable(guardVal).pipe(first());
3275
3337
  });
3276
3338
  });
3277
3339
  return of(canActivateObservables).pipe(prioritizedGuardValue());
3278
3340
  }
3279
- function runCanActivateChild(futureRSS, path, moduleInjector) {
3341
+ function runCanActivateChild(futureRSS, path, injector) {
3280
3342
  const futureARS = path[path.length - 1];
3281
3343
  const canActivateChildGuards = path.slice(0, path.length - 1)
3282
3344
  .reverse()
@@ -3284,10 +3346,13 @@ function runCanActivateChild(futureRSS, path, moduleInjector) {
3284
3346
  .filter(_ => _ !== null);
3285
3347
  const canActivateChildGuardsMapped = canActivateChildGuards.map((d) => {
3286
3348
  return defer(() => {
3287
- const guardsMapped = d.guards.map((c) => {
3288
- const guard = getToken(c, d.node, moduleInjector);
3289
- const guardVal = isCanActivateChild(guard) ? guard.canActivateChild(futureARS, futureRSS) :
3290
- guard(futureARS, futureRSS);
3349
+ const guardsMapped = d.guards.map((canActivateChild) => {
3350
+ var _a;
3351
+ const closestInjector = (_a = getClosestRouteInjector(d.node)) !== null && _a !== void 0 ? _a : injector;
3352
+ const guard = getTokenOrFunctionIdentity(canActivateChild, closestInjector);
3353
+ const guardVal = isCanActivateChild(guard) ?
3354
+ guard.canActivateChild(futureARS, futureRSS) :
3355
+ closestInjector.runInContext(() => guard(futureARS, futureRSS));
3291
3356
  return wrapIntoObservable(guardVal).pipe(first());
3292
3357
  });
3293
3358
  return of(guardsMapped).pipe(prioritizedGuardValue());
@@ -3295,15 +3360,17 @@ function runCanActivateChild(futureRSS, path, moduleInjector) {
3295
3360
  });
3296
3361
  return of(canActivateChildGuardsMapped).pipe(prioritizedGuardValue());
3297
3362
  }
3298
- function runCanDeactivate(component, currARS, currRSS, futureRSS, moduleInjector) {
3363
+ function runCanDeactivate(component, currARS, currRSS, futureRSS, injector) {
3299
3364
  const canDeactivate = currARS && currARS.routeConfig ? currARS.routeConfig.canDeactivate : null;
3300
3365
  if (!canDeactivate || canDeactivate.length === 0)
3301
3366
  return of(true);
3302
3367
  const canDeactivateObservables = canDeactivate.map((c) => {
3303
- const guard = getToken(c, currARS, moduleInjector);
3368
+ var _a;
3369
+ const closestInjector = (_a = getClosestRouteInjector(currARS)) !== null && _a !== void 0 ? _a : injector;
3370
+ const guard = getTokenOrFunctionIdentity(c, closestInjector);
3304
3371
  const guardVal = isCanDeactivate(guard) ?
3305
3372
  guard.canDeactivate(component, currARS, currRSS, futureRSS) :
3306
- guard(component, currARS, currRSS, futureRSS);
3373
+ closestInjector.runInContext(() => guard(component, currARS, currRSS, futureRSS));
3307
3374
  return wrapIntoObservable(guardVal).pipe(first());
3308
3375
  });
3309
3376
  return of(canDeactivateObservables).pipe(prioritizedGuardValue());
@@ -3314,8 +3381,10 @@ function runCanLoadGuards(injector, route, segments, urlSerializer) {
3314
3381
  return of(true);
3315
3382
  }
3316
3383
  const canLoadObservables = canLoad.map((injectionToken) => {
3317
- const guard = injector.get(injectionToken);
3318
- const guardVal = isCanLoad(guard) ? guard.canLoad(route, segments) : guard(route, segments);
3384
+ const guard = getTokenOrFunctionIdentity(injectionToken, injector);
3385
+ const guardVal = isCanLoad(guard) ?
3386
+ guard.canLoad(route, segments) :
3387
+ injector.runInContext(() => guard(route, segments));
3319
3388
  return wrapIntoObservable(guardVal);
3320
3389
  });
3321
3390
  return of(canLoadObservables)
@@ -3333,8 +3402,10 @@ function runCanMatchGuards(injector, route, segments, urlSerializer) {
3333
3402
  if (!canMatch || canMatch.length === 0)
3334
3403
  return of(true);
3335
3404
  const canMatchObservables = canMatch.map(injectionToken => {
3336
- const guard = injector.get(injectionToken);
3337
- const guardVal = isCanMatch(guard) ? guard.canMatch(route, segments) : guard(route, segments);
3405
+ const guard = getTokenOrFunctionIdentity(injectionToken, injector);
3406
+ const guardVal = isCanMatch(guard) ?
3407
+ guard.canMatch(route, segments) :
3408
+ injector.runInContext(() => guard(route, segments));
3338
3409
  return wrapIntoObservable(guardVal);
3339
3410
  });
3340
3411
  return of(canMatchObservables)
@@ -3503,7 +3574,7 @@ function noLeftoversInUrl(segmentGroup, segments, outlet) {
3503
3574
  * Use of this source code is governed by an MIT-style license that can be
3504
3575
  * found in the LICENSE file at https://angular.io/license
3505
3576
  */
3506
- const NG_DEV_MODE$4 = typeof ngDevMode === 'undefined' || ngDevMode;
3577
+ const NG_DEV_MODE$5 = typeof ngDevMode === 'undefined' || ngDevMode;
3507
3578
  class NoMatch$1 {
3508
3579
  constructor(segmentGroup) {
3509
3580
  this.segmentGroup = segmentGroup || null;
@@ -3521,11 +3592,11 @@ function absoluteRedirect(newTree) {
3521
3592
  return throwError(new AbsoluteRedirect(newTree));
3522
3593
  }
3523
3594
  function namedOutletsRedirect(redirectTo) {
3524
- return throwError(new ɵRuntimeError(4000 /* RuntimeErrorCode.NAMED_OUTLET_REDIRECT */, NG_DEV_MODE$4 &&
3595
+ return throwError(new ɵRuntimeError(4000 /* RuntimeErrorCode.NAMED_OUTLET_REDIRECT */, NG_DEV_MODE$5 &&
3525
3596
  `Only absolute redirects can have named outlets. redirectTo: '${redirectTo}'`));
3526
3597
  }
3527
3598
  function canLoadFails(route) {
3528
- return throwError(navigationCancelingError(NG_DEV_MODE$4 &&
3599
+ return throwError(navigationCancelingError(NG_DEV_MODE$5 &&
3529
3600
  `Cannot load children because the guard of the route "path: '${route.path}'" returned false`, 3 /* NavigationCancellationCode.GuardRejected */));
3530
3601
  }
3531
3602
  /**
@@ -3585,7 +3656,7 @@ class ApplyRedirects {
3585
3656
  }));
3586
3657
  }
3587
3658
  noMatchError(e) {
3588
- return new ɵRuntimeError(4002 /* RuntimeErrorCode.NO_MATCH */, NG_DEV_MODE$4 && `Cannot match any routes. URL Segment: '${e.segmentGroup}'`);
3659
+ return new ɵRuntimeError(4002 /* RuntimeErrorCode.NO_MATCH */, NG_DEV_MODE$5 && `Cannot match any routes. URL Segment: '${e.segmentGroup}'`);
3589
3660
  }
3590
3661
  createUrlTree(rootCandidate, queryParams, fragment) {
3591
3662
  const root = createRoot(rootCandidate);
@@ -3635,7 +3706,7 @@ class ApplyRedirects {
3635
3706
  throw e;
3636
3707
  }));
3637
3708
  }), first((s) => !!s), catchError((e, _) => {
3638
- if (e instanceof EmptyError || e.name === 'EmptyError') {
3709
+ if (isEmptyError(e)) {
3639
3710
  if (noLeftoversInUrl(segmentGroup, segments, outlet)) {
3640
3711
  return of(new UrlSegmentGroup([], {}));
3641
3712
  }
@@ -3802,7 +3873,7 @@ class ApplyRedirects {
3802
3873
  findPosParam(redirectTo, redirectToUrlSegment, posParams) {
3803
3874
  const pos = posParams[redirectToUrlSegment.path.substring(1)];
3804
3875
  if (!pos)
3805
- throw new ɵRuntimeError(4001 /* RuntimeErrorCode.MISSING_REDIRECT */, NG_DEV_MODE$4 &&
3876
+ throw new ɵRuntimeError(4001 /* RuntimeErrorCode.MISSING_REDIRECT */, NG_DEV_MODE$5 &&
3806
3877
  `Cannot redirect to '${redirectTo}'. Cannot find '${redirectToUrlSegment.path}'.`);
3807
3878
  return pos;
3808
3879
  }
@@ -3838,7 +3909,7 @@ function applyRedirects(environmentInjector, configLoader, urlSerializer, config
3838
3909
  * Use of this source code is governed by an MIT-style license that can be
3839
3910
  * found in the LICENSE file at https://angular.io/license
3840
3911
  */
3841
- const NG_DEV_MODE$3 = typeof ngDevMode === 'undefined' || !!ngDevMode;
3912
+ const NG_DEV_MODE$4 = typeof ngDevMode === 'undefined' || !!ngDevMode;
3842
3913
  class NoMatch {
3843
3914
  }
3844
3915
  function newObservableError(e) {
@@ -3927,7 +3998,7 @@ class Recognizer {
3927
3998
  // multiple activated results for the same outlet. We should merge the children of
3928
3999
  // these results so the final return value is only one `TreeNode` per outlet.
3929
4000
  const mergedChildren = mergeEmptyPathMatches(children);
3930
- if (NG_DEV_MODE$3) {
4001
+ if (NG_DEV_MODE$4) {
3931
4002
  // This should really never happen - we are only taking the first match for each
3932
4003
  // outlet and merge the empty path matches.
3933
4004
  checkOutletNameUniqueness(mergedChildren);
@@ -3941,7 +4012,7 @@ class Recognizer {
3941
4012
  var _a;
3942
4013
  return this.processSegmentAgainstRoute((_a = r._injector) !== null && _a !== void 0 ? _a : injector, r, segmentGroup, segments, outlet);
3943
4014
  }), first((x) => !!x), catchError(e => {
3944
- if (e instanceof EmptyError) {
4015
+ if (isEmptyError(e)) {
3945
4016
  if (noLeftoversInUrl(segmentGroup, segments, outlet)) {
3946
4017
  return of([]);
3947
4018
  }
@@ -3962,7 +4033,7 @@ class Recognizer {
3962
4033
  // NG_DEV_MODE is used to prevent the getCorrectedPathIndexShift function from affecting
3963
4034
  // production bundle size. This value is intended only to surface a warning to users
3964
4035
  // depending on `relativeLinkResolution: 'legacy'` in dev mode.
3965
- (NG_DEV_MODE$3 ? getCorrectedPathIndexShift(rawSegment) + segments.length :
4036
+ (NG_DEV_MODE$4 ? getCorrectedPathIndexShift(rawSegment) + segments.length :
3966
4037
  pathIndexShift));
3967
4038
  matchResult = of({
3968
4039
  snapshot,
@@ -3979,7 +4050,7 @@ class Recognizer {
3979
4050
  return null;
3980
4051
  }
3981
4052
  const pathIndexShift = getPathIndexShift(rawSegment) + consumedSegments.length;
3982
- const snapshot = new ActivatedRouteSnapshot(consumedSegments, parameters, Object.freeze(Object.assign({}, this.urlTree.queryParams)), this.urlTree.fragment, getData(route), getOutlet(route), (_b = (_a = route.component) !== null && _a !== void 0 ? _a : route._loadedComponent) !== null && _b !== void 0 ? _b : null, route, getSourceSegmentGroup(rawSegment), pathIndexShift, getResolve(route), (NG_DEV_MODE$3 ?
4053
+ const snapshot = new ActivatedRouteSnapshot(consumedSegments, parameters, Object.freeze(Object.assign({}, this.urlTree.queryParams)), this.urlTree.fragment, getData(route), getOutlet(route), (_b = (_a = route.component) !== null && _a !== void 0 ? _a : route._loadedComponent) !== null && _b !== void 0 ? _b : null, route, getSourceSegmentGroup(rawSegment), pathIndexShift, getResolve(route), (NG_DEV_MODE$4 ?
3983
4054
  getCorrectedPathIndexShift(rawSegment) + consumedSegments.length :
3984
4055
  pathIndexShift));
3985
4056
  return { snapshot, consumedSegments, remainingSegments };
@@ -4093,7 +4164,7 @@ function checkOutletNameUniqueness(nodes) {
4093
4164
  if (routeWithSameOutletName) {
4094
4165
  const p = routeWithSameOutletName.url.map(s => s.toString()).join('/');
4095
4166
  const c = n.value.url.map(s => s.toString()).join('/');
4096
- throw new ɵRuntimeError(4006 /* RuntimeErrorCode.TWO_SEGMENTS_WITH_SAME_OUTLET */, NG_DEV_MODE$3 && `Two segments cannot have the same outlet name: '${p}' and '${c}'.`);
4167
+ throw new ɵRuntimeError(4006 /* RuntimeErrorCode.TWO_SEGMENTS_WITH_SAME_OUTLET */, NG_DEV_MODE$4 && `Two segments cannot have the same outlet name: '${p}' and '${c}'.`);
4097
4168
  }
4098
4169
  names[n.value.outlet] = n.value;
4099
4170
  });
@@ -4151,13 +4222,7 @@ function recognize(injector, rootComponentType, config, serializer, paramsInheri
4151
4222
  * Use of this source code is governed by an MIT-style license that can be
4152
4223
  * found in the LICENSE file at https://angular.io/license
4153
4224
  */
4154
- /**
4155
- * A private symbol used to store the value of `Route.title` inside the `Route.data` if it is a
4156
- * static string or `Route.resolve` if anything else. This allows us to reuse the existing route
4157
- * data/resolvers to support the title feature without new instrumentation in the `Router` pipeline.
4158
- */
4159
- const RouteTitle = Symbol('RouteTitle');
4160
- function resolveData(paramsInheritanceStrategy, moduleInjector) {
4225
+ function resolveData(paramsInheritanceStrategy, injector) {
4161
4226
  return mergeMap(t => {
4162
4227
  const { targetSnapshot, guards: { canActivateChecks } } = t;
4163
4228
  if (!canActivateChecks.length) {
@@ -4165,43 +4230,46 @@ function resolveData(paramsInheritanceStrategy, moduleInjector) {
4165
4230
  }
4166
4231
  let canActivateChecksResolved = 0;
4167
4232
  return from(canActivateChecks)
4168
- .pipe(concatMap(check => runResolve(check.route, targetSnapshot, paramsInheritanceStrategy, moduleInjector)), tap(() => canActivateChecksResolved++), takeLast(1), mergeMap(_ => canActivateChecksResolved === canActivateChecks.length ? of(t) : EMPTY));
4233
+ .pipe(concatMap(check => runResolve(check.route, targetSnapshot, paramsInheritanceStrategy, injector)), tap(() => canActivateChecksResolved++), takeLast(1), mergeMap(_ => canActivateChecksResolved === canActivateChecks.length ? of(t) : EMPTY));
4169
4234
  });
4170
4235
  }
4171
- function runResolve(futureARS, futureRSS, paramsInheritanceStrategy, moduleInjector) {
4236
+ function runResolve(futureARS, futureRSS, paramsInheritanceStrategy, injector) {
4172
4237
  const config = futureARS.routeConfig;
4173
4238
  const resolve = futureARS._resolve;
4174
4239
  if ((config === null || config === void 0 ? void 0 : config.title) !== undefined && !hasStaticTitle(config)) {
4175
- resolve[RouteTitle] = config.title;
4240
+ resolve[RouteTitleKey] = config.title;
4176
4241
  }
4177
- return resolveNode(resolve, futureARS, futureRSS, moduleInjector)
4178
- .pipe(map((resolvedData) => {
4242
+ return resolveNode(resolve, futureARS, futureRSS, injector).pipe(map((resolvedData) => {
4179
4243
  futureARS._resolvedData = resolvedData;
4180
4244
  futureARS.data = inheritedParamsDataResolve(futureARS, paramsInheritanceStrategy).resolve;
4181
4245
  if (config && hasStaticTitle(config)) {
4182
- futureARS.data[RouteTitle] = config.title;
4246
+ futureARS.data[RouteTitleKey] = config.title;
4183
4247
  }
4184
4248
  return null;
4185
4249
  }));
4186
4250
  }
4187
- function resolveNode(resolve, futureARS, futureRSS, moduleInjector) {
4251
+ function resolveNode(resolve, futureARS, futureRSS, injector) {
4188
4252
  const keys = getDataKeys(resolve);
4189
4253
  if (keys.length === 0) {
4190
4254
  return of({});
4191
4255
  }
4192
4256
  const data = {};
4193
- return from(keys).pipe(mergeMap(key => getResolver(resolve[key], futureARS, futureRSS, moduleInjector)
4257
+ return from(keys).pipe(mergeMap(key => getResolver(resolve[key], futureARS, futureRSS, injector)
4194
4258
  .pipe(first(), tap((value) => {
4195
4259
  data[key] = value;
4196
- }))), takeLast(1), mapTo(data), catchError((e) => e instanceof EmptyError ? EMPTY : throwError(e)));
4260
+ }))), takeLast(1), mapTo(data), catchError((e) => isEmptyError(e) ? EMPTY : throwError(e)));
4197
4261
  }
4198
4262
  function getDataKeys(obj) {
4199
4263
  return [...Object.keys(obj), ...Object.getOwnPropertySymbols(obj)];
4200
4264
  }
4201
- function getResolver(injectionToken, futureARS, futureRSS, moduleInjector) {
4202
- const resolver = getToken(injectionToken, futureARS, moduleInjector);
4203
- return resolver.resolve ? wrapIntoObservable(resolver.resolve(futureARS, futureRSS)) :
4204
- wrapIntoObservable(resolver(futureARS, futureRSS));
4265
+ function getResolver(injectionToken, futureARS, futureRSS, injector) {
4266
+ var _a;
4267
+ const closestInjector = (_a = getClosestRouteInjector(futureARS)) !== null && _a !== void 0 ? _a : injector;
4268
+ const resolver = getTokenOrFunctionIdentity(injectionToken, closestInjector);
4269
+ const resolverValue = resolver.resolve ?
4270
+ resolver.resolve(futureARS, futureRSS) :
4271
+ closestInjector.runInContext(() => resolver(futureARS, futureRSS));
4272
+ return wrapIntoObservable(resolverValue);
4205
4273
  }
4206
4274
  function hasStaticTitle(config) {
4207
4275
  return typeof config.title === 'string' || config.title === null;
@@ -4230,6 +4298,91 @@ function switchTap(next) {
4230
4298
  });
4231
4299
  }
4232
4300
 
4301
+ /**
4302
+ * @license
4303
+ * Copyright Google LLC All Rights Reserved.
4304
+ *
4305
+ * Use of this source code is governed by an MIT-style license that can be
4306
+ * found in the LICENSE file at https://angular.io/license
4307
+ */
4308
+ /**
4309
+ * Provides a strategy for setting the page title after a router navigation.
4310
+ *
4311
+ * The built-in implementation traverses the router state snapshot and finds the deepest primary
4312
+ * outlet with `title` property. Given the `Routes` below, navigating to
4313
+ * `/base/child(popup:aux)` would result in the document title being set to "child".
4314
+ * ```
4315
+ * [
4316
+ * {path: 'base', title: 'base', children: [
4317
+ * {path: 'child', title: 'child'},
4318
+ * ],
4319
+ * {path: 'aux', outlet: 'popup', title: 'popupTitle'}
4320
+ * ]
4321
+ * ```
4322
+ *
4323
+ * This class can be used as a base class for custom title strategies. That is, you can create your
4324
+ * own class that extends the `TitleStrategy`. Note that in the above example, the `title`
4325
+ * from the named outlet is never used. However, a custom strategy might be implemented to
4326
+ * incorporate titles in named outlets.
4327
+ *
4328
+ * @publicApi
4329
+ * @see [Page title guide](guide/router#setting-the-page-title)
4330
+ */
4331
+ class TitleStrategy {
4332
+ /**
4333
+ * @returns The `title` of the deepest primary route.
4334
+ */
4335
+ buildTitle(snapshot) {
4336
+ var _a;
4337
+ let pageTitle;
4338
+ let route = snapshot.root;
4339
+ while (route !== undefined) {
4340
+ pageTitle = (_a = this.getResolvedTitleForRoute(route)) !== null && _a !== void 0 ? _a : pageTitle;
4341
+ route = route.children.find(child => child.outlet === PRIMARY_OUTLET);
4342
+ }
4343
+ return pageTitle;
4344
+ }
4345
+ /**
4346
+ * Given an `ActivatedRouteSnapshot`, returns the final value of the
4347
+ * `Route.title` property, which can either be a static string or a resolved value.
4348
+ */
4349
+ getResolvedTitleForRoute(snapshot) {
4350
+ return snapshot.data[RouteTitleKey];
4351
+ }
4352
+ }
4353
+ TitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: TitleStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4354
+ TitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: TitleStrategy, providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) });
4355
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: TitleStrategy, decorators: [{
4356
+ type: Injectable,
4357
+ args: [{ providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) }]
4358
+ }] });
4359
+ /**
4360
+ * The default `TitleStrategy` used by the router that updates the title using the `Title` service.
4361
+ */
4362
+ class DefaultTitleStrategy extends TitleStrategy {
4363
+ constructor(title) {
4364
+ super();
4365
+ this.title = title;
4366
+ }
4367
+ /**
4368
+ * Sets the title of the browser to the given value.
4369
+ *
4370
+ * @param title The `pageTitle` from the deepest primary route.
4371
+ */
4372
+ updateTitle(snapshot) {
4373
+ const title = this.buildTitle(snapshot);
4374
+ if (title !== undefined) {
4375
+ this.title.setTitle(title);
4376
+ }
4377
+ }
4378
+ }
4379
+ DefaultTitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: DefaultTitleStrategy, deps: [{ token: i1.Title }], target: i0.ɵɵFactoryTarget.Injectable });
4380
+ DefaultTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: DefaultTitleStrategy, providedIn: 'root' });
4381
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: DefaultTitleStrategy, decorators: [{
4382
+ type: Injectable,
4383
+ args: [{ providedIn: 'root' }]
4384
+ }], ctorParameters: function () { return [{ type: i1.Title }]; } });
4385
+
4233
4386
  /**
4234
4387
  * @license
4235
4388
  * Copyright Google LLC All Rights Reserved.
@@ -4295,6 +4448,24 @@ class BaseRouteReuseStrategy {
4295
4448
  class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {
4296
4449
  }
4297
4450
 
4451
+ /**
4452
+ * @license
4453
+ * Copyright Google LLC All Rights Reserved.
4454
+ *
4455
+ * Use of this source code is governed by an MIT-style license that can be
4456
+ * found in the LICENSE file at https://angular.io/license
4457
+ */
4458
+ const NG_DEV_MODE$3 = typeof ngDevMode === 'undefined' || !!ngDevMode;
4459
+ /**
4460
+ * A [DI token](guide/glossary/#di-token) for the router service.
4461
+ *
4462
+ * @publicApi
4463
+ */
4464
+ const ROUTER_CONFIGURATION = new InjectionToken(NG_DEV_MODE$3 ? 'router config' : '', {
4465
+ providedIn: 'root',
4466
+ factory: () => ({}),
4467
+ });
4468
+
4298
4469
  /**
4299
4470
  * @license
4300
4471
  * Copyright Google LLC All Rights Reserved.
@@ -4402,10 +4573,11 @@ class RouterConfigLoader {
4402
4573
  }));
4403
4574
  }
4404
4575
  }
4405
- RouterConfigLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterConfigLoader, deps: [{ token: i0.Injector }, { token: i0.Compiler }], target: i0.ɵɵFactoryTarget.Injectable });
4406
- RouterConfigLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterConfigLoader });
4407
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterConfigLoader, decorators: [{
4408
- type: Injectable
4576
+ RouterConfigLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: RouterConfigLoader, deps: [{ token: i0.Injector }, { token: i0.Compiler }], target: i0.ɵɵFactoryTarget.Injectable });
4577
+ RouterConfigLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: RouterConfigLoader, providedIn: 'root' });
4578
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: RouterConfigLoader, decorators: [{
4579
+ type: Injectable,
4580
+ args: [{ providedIn: 'root' }]
4409
4581
  }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.Compiler }]; } });
4410
4582
 
4411
4583
  /**
@@ -4439,6 +4611,13 @@ class DefaultUrlHandlingStrategy {
4439
4611
  }
4440
4612
  }
4441
4613
 
4614
+ /**
4615
+ * @license
4616
+ * Copyright Google LLC All Rights Reserved.
4617
+ *
4618
+ * Use of this source code is governed by an MIT-style license that can be
4619
+ * found in the LICENSE file at https://angular.io/license
4620
+ */
4442
4621
  const NG_DEV_MODE$1 = typeof ngDevMode === 'undefined' || !!ngDevMode;
4443
4622
  function defaultErrorHandler(error) {
4444
4623
  throw error;
@@ -4466,6 +4645,53 @@ const subsetMatchOptions = {
4466
4645
  matrixParams: 'ignored',
4467
4646
  queryParams: 'subset'
4468
4647
  };
4648
+ function assignExtraOptionsToRouter(opts, router) {
4649
+ if (opts.errorHandler) {
4650
+ router.errorHandler = opts.errorHandler;
4651
+ }
4652
+ if (opts.malformedUriErrorHandler) {
4653
+ router.malformedUriErrorHandler = opts.malformedUriErrorHandler;
4654
+ }
4655
+ if (opts.onSameUrlNavigation) {
4656
+ router.onSameUrlNavigation = opts.onSameUrlNavigation;
4657
+ }
4658
+ if (opts.paramsInheritanceStrategy) {
4659
+ router.paramsInheritanceStrategy = opts.paramsInheritanceStrategy;
4660
+ }
4661
+ if (opts.relativeLinkResolution) {
4662
+ router.relativeLinkResolution = opts.relativeLinkResolution;
4663
+ }
4664
+ if (opts.urlUpdateStrategy) {
4665
+ router.urlUpdateStrategy = opts.urlUpdateStrategy;
4666
+ }
4667
+ if (opts.canceledNavigationResolution) {
4668
+ router.canceledNavigationResolution = opts.canceledNavigationResolution;
4669
+ }
4670
+ }
4671
+ function setupRouter() {
4672
+ var _a, _b;
4673
+ const urlSerializer = inject(UrlSerializer);
4674
+ const contexts = inject(ChildrenOutletContexts);
4675
+ const location = inject(Location);
4676
+ const injector = inject(Injector);
4677
+ const compiler = inject(Compiler);
4678
+ const config = (_a = inject(ROUTES, { optional: true })) !== null && _a !== void 0 ? _a : [];
4679
+ const opts = (_b = inject(ROUTER_CONFIGURATION, { optional: true })) !== null && _b !== void 0 ? _b : {};
4680
+ const defaultTitleStrategy = inject(DefaultTitleStrategy);
4681
+ const titleStrategy = inject(TitleStrategy, { optional: true });
4682
+ const urlHandlingStrategy = inject(UrlHandlingStrategy, { optional: true });
4683
+ const routeReuseStrategy = inject(RouteReuseStrategy, { optional: true });
4684
+ const router = new Router(null, urlSerializer, contexts, location, injector, compiler, flatten(config));
4685
+ if (urlHandlingStrategy) {
4686
+ router.urlHandlingStrategy = urlHandlingStrategy;
4687
+ }
4688
+ if (routeReuseStrategy) {
4689
+ router.routeReuseStrategy = routeReuseStrategy;
4690
+ }
4691
+ router.titleStrategy = titleStrategy !== null && titleStrategy !== void 0 ? titleStrategy : defaultTitleStrategy;
4692
+ assignExtraOptionsToRouter(opts, router);
4693
+ return router;
4694
+ }
4469
4695
  /**
4470
4696
  * @description
4471
4697
  *
@@ -5373,10 +5599,14 @@ class Router {
5373
5599
  return { navigationId };
5374
5600
  }
5375
5601
  }
5376
- Router.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: Router, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
5377
- Router.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: Router });
5378
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: Router, decorators: [{
5379
- type: Injectable
5602
+ Router.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: Router, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
5603
+ Router.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: Router, providedIn: 'root', useFactory: setupRouter });
5604
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: Router, decorators: [{
5605
+ type: Injectable,
5606
+ args: [{
5607
+ providedIn: 'root',
5608
+ useFactory: setupRouter,
5609
+ }]
5380
5610
  }], ctorParameters: function () { return [{ type: i0.Type }, { type: UrlSerializer }, { type: ChildrenOutletContexts }, { type: i3.Location }, { type: i0.Injector }, { type: i0.Compiler }, { type: undefined }]; } });
5381
5611
  function validateCommands(commands) {
5382
5612
  for (let i = 0; i < commands.length; i++) {
@@ -5567,11 +5797,14 @@ class RouterLink {
5567
5797
  });
5568
5798
  }
5569
5799
  }
5570
- RouterLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterLink, deps: [{ token: Router }, { token: ActivatedRoute }, { token: 'tabindex', attribute: true }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
5571
- RouterLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.0", type: RouterLink, selector: ":not(a):not(area)[routerLink]", inputs: { queryParams: "queryParams", fragment: "fragment", queryParamsHandling: "queryParamsHandling", preserveFragment: "preserveFragment", skipLocationChange: "skipLocationChange", replaceUrl: "replaceUrl", state: "state", relativeTo: "relativeTo", routerLink: "routerLink" }, host: { listeners: { "click": "onClick()" } }, usesOnChanges: true, ngImport: i0 });
5572
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterLink, decorators: [{
5800
+ RouterLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: RouterLink, deps: [{ token: Router }, { token: ActivatedRoute }, { token: 'tabindex', attribute: true }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
5801
+ RouterLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0-next.1", type: RouterLink, isStandalone: true, selector: ":not(a):not(area)[routerLink]", inputs: { queryParams: "queryParams", fragment: "fragment", queryParamsHandling: "queryParamsHandling", preserveFragment: "preserveFragment", skipLocationChange: "skipLocationChange", replaceUrl: "replaceUrl", state: "state", relativeTo: "relativeTo", routerLink: "routerLink" }, host: { listeners: { "click": "onClick()" } }, usesOnChanges: true, ngImport: i0 });
5802
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: RouterLink, decorators: [{
5573
5803
  type: Directive,
5574
- args: [{ selector: ':not(a):not(area)[routerLink]' }]
5804
+ args: [{
5805
+ selector: ':not(a):not(area)[routerLink]',
5806
+ standalone: true,
5807
+ }]
5575
5808
  }], ctorParameters: function () {
5576
5809
  return [{ type: Router }, { type: ActivatedRoute }, { type: undefined, decorators: [{
5577
5810
  type: Attribute,
@@ -5688,11 +5921,11 @@ class RouterLinkWithHref {
5688
5921
  });
5689
5922
  }
5690
5923
  }
5691
- RouterLinkWithHref.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterLinkWithHref, deps: [{ token: Router }, { token: ActivatedRoute }, { token: i3.LocationStrategy }], target: i0.ɵɵFactoryTarget.Directive });
5692
- RouterLinkWithHref.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.0", type: RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: { target: "target", queryParams: "queryParams", fragment: "fragment", queryParamsHandling: "queryParamsHandling", preserveFragment: "preserveFragment", skipLocationChange: "skipLocationChange", replaceUrl: "replaceUrl", state: "state", relativeTo: "relativeTo", routerLink: "routerLink" }, host: { listeners: { "click": "onClick($event.button,$event.ctrlKey,$event.shiftKey,$event.altKey,$event.metaKey)" }, properties: { "attr.target": "this.target", "attr.href": "this.href" } }, usesOnChanges: true, ngImport: i0 });
5693
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterLinkWithHref, decorators: [{
5924
+ RouterLinkWithHref.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: RouterLinkWithHref, deps: [{ token: Router }, { token: ActivatedRoute }, { token: i3.LocationStrategy }], target: i0.ɵɵFactoryTarget.Directive });
5925
+ RouterLinkWithHref.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0-next.1", type: RouterLinkWithHref, isStandalone: true, selector: "a[routerLink],area[routerLink]", inputs: { target: "target", queryParams: "queryParams", fragment: "fragment", queryParamsHandling: "queryParamsHandling", preserveFragment: "preserveFragment", skipLocationChange: "skipLocationChange", replaceUrl: "replaceUrl", state: "state", relativeTo: "relativeTo", routerLink: "routerLink" }, host: { listeners: { "click": "onClick($event.button,$event.ctrlKey,$event.shiftKey,$event.altKey,$event.metaKey)" }, properties: { "attr.target": "this.target", "attr.href": "this.href" } }, usesOnChanges: true, ngImport: i0 });
5926
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: RouterLinkWithHref, decorators: [{
5694
5927
  type: Directive,
5695
- args: [{ selector: 'a[routerLink],area[routerLink]' }]
5928
+ args: [{ selector: 'a[routerLink],area[routerLink]', standalone: true }]
5696
5929
  }], ctorParameters: function () { return [{ type: Router }, { type: ActivatedRoute }, { type: i3.LocationStrategy }]; }, propDecorators: { target: [{
5697
5930
  type: HostBinding,
5698
5931
  args: ['attr.target']
@@ -5917,13 +6150,14 @@ class RouterLinkActive {
5917
6150
  this.links.some(isActiveCheckFn) || this.linksWithHrefs.some(isActiveCheckFn);
5918
6151
  }
5919
6152
  }
5920
- RouterLinkActive.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterLinkActive, deps: [{ token: Router }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: RouterLink, optional: true }, { token: RouterLinkWithHref, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
5921
- RouterLinkActive.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.0", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: { routerLinkActiveOptions: "routerLinkActiveOptions", ariaCurrentWhenActive: "ariaCurrentWhenActive", routerLinkActive: "routerLinkActive" }, outputs: { isActiveChange: "isActiveChange" }, queries: [{ propertyName: "links", predicate: RouterLink, descendants: true }, { propertyName: "linksWithHrefs", predicate: RouterLinkWithHref, descendants: true }], exportAs: ["routerLinkActive"], usesOnChanges: true, ngImport: i0 });
5922
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterLinkActive, decorators: [{
6153
+ RouterLinkActive.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: RouterLinkActive, deps: [{ token: Router }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: RouterLink, optional: true }, { token: RouterLinkWithHref, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
6154
+ RouterLinkActive.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0-next.1", type: RouterLinkActive, isStandalone: true, selector: "[routerLinkActive]", inputs: { routerLinkActiveOptions: "routerLinkActiveOptions", ariaCurrentWhenActive: "ariaCurrentWhenActive", routerLinkActive: "routerLinkActive" }, outputs: { isActiveChange: "isActiveChange" }, queries: [{ propertyName: "links", predicate: RouterLink, descendants: true }, { propertyName: "linksWithHrefs", predicate: RouterLinkWithHref, descendants: true }], exportAs: ["routerLinkActive"], usesOnChanges: true, ngImport: i0 });
6155
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: RouterLinkActive, decorators: [{
5923
6156
  type: Directive,
5924
6157
  args: [{
5925
6158
  selector: '[routerLinkActive]',
5926
6159
  exportAs: 'routerLinkActive',
6160
+ standalone: true,
5927
6161
  }]
5928
6162
  }], ctorParameters: function () {
5929
6163
  return [{ type: Router }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: RouterLink, decorators: [{
@@ -5953,91 +6187,6 @@ function isActiveMatchOptions(options) {
5953
6187
  return !!options.paths;
5954
6188
  }
5955
6189
 
5956
- /**
5957
- * @license
5958
- * Copyright Google LLC All Rights Reserved.
5959
- *
5960
- * Use of this source code is governed by an MIT-style license that can be
5961
- * found in the LICENSE file at https://angular.io/license
5962
- */
5963
- /**
5964
- * Provides a strategy for setting the page title after a router navigation.
5965
- *
5966
- * The built-in implementation traverses the router state snapshot and finds the deepest primary
5967
- * outlet with `title` property. Given the `Routes` below, navigating to
5968
- * `/base/child(popup:aux)` would result in the document title being set to "child".
5969
- * ```
5970
- * [
5971
- * {path: 'base', title: 'base', children: [
5972
- * {path: 'child', title: 'child'},
5973
- * ],
5974
- * {path: 'aux', outlet: 'popup', title: 'popupTitle'}
5975
- * ]
5976
- * ```
5977
- *
5978
- * This class can be used as a base class for custom title strategies. That is, you can create your
5979
- * own class that extends the `TitleStrategy`. Note that in the above example, the `title`
5980
- * from the named outlet is never used. However, a custom strategy might be implemented to
5981
- * incorporate titles in named outlets.
5982
- *
5983
- * @publicApi
5984
- * @see [Page title guide](guide/router#setting-the-page-title)
5985
- */
5986
- class TitleStrategy {
5987
- /**
5988
- * @returns The `title` of the deepest primary route.
5989
- */
5990
- buildTitle(snapshot) {
5991
- var _a;
5992
- let pageTitle;
5993
- let route = snapshot.root;
5994
- while (route !== undefined) {
5995
- pageTitle = (_a = this.getResolvedTitleForRoute(route)) !== null && _a !== void 0 ? _a : pageTitle;
5996
- route = route.children.find(child => child.outlet === PRIMARY_OUTLET);
5997
- }
5998
- return pageTitle;
5999
- }
6000
- /**
6001
- * Given an `ActivatedRouteSnapshot`, returns the final value of the
6002
- * `Route.title` property, which can either be a static string or a resolved value.
6003
- */
6004
- getResolvedTitleForRoute(snapshot) {
6005
- return snapshot.data[RouteTitle];
6006
- }
6007
- }
6008
- TitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: TitleStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6009
- TitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: TitleStrategy, providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) });
6010
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: TitleStrategy, decorators: [{
6011
- type: Injectable,
6012
- args: [{ providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) }]
6013
- }] });
6014
- /**
6015
- * The default `TitleStrategy` used by the router that updates the title using the `Title` service.
6016
- */
6017
- class DefaultTitleStrategy extends TitleStrategy {
6018
- constructor(title) {
6019
- super();
6020
- this.title = title;
6021
- }
6022
- /**
6023
- * Sets the title of the browser to the given value.
6024
- *
6025
- * @param title The `pageTitle` from the deepest primary route.
6026
- */
6027
- updateTitle(snapshot) {
6028
- const title = this.buildTitle(snapshot);
6029
- if (title !== undefined) {
6030
- this.title.setTitle(title);
6031
- }
6032
- }
6033
- }
6034
- DefaultTitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: DefaultTitleStrategy, deps: [{ token: i1.Title }], target: i0.ɵɵFactoryTarget.Injectable });
6035
- DefaultTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: DefaultTitleStrategy, providedIn: 'root' });
6036
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: DefaultTitleStrategy, decorators: [{
6037
- type: Injectable,
6038
- args: [{ providedIn: 'root' }]
6039
- }], ctorParameters: function () { return [{ type: i1.Title }]; } });
6040
-
6041
6190
  /**
6042
6191
  * @license
6043
6192
  * Copyright Google LLC All Rights Reserved.
@@ -6070,9 +6219,9 @@ class PreloadAllModules {
6070
6219
  return fn().pipe(catchError(() => of(null)));
6071
6220
  }
6072
6221
  }
6073
- PreloadAllModules.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: PreloadAllModules, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6074
- PreloadAllModules.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: PreloadAllModules, providedIn: 'root' });
6075
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: PreloadAllModules, decorators: [{
6222
+ PreloadAllModules.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: PreloadAllModules, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6223
+ PreloadAllModules.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: PreloadAllModules, providedIn: 'root' });
6224
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: PreloadAllModules, decorators: [{
6076
6225
  type: Injectable,
6077
6226
  args: [{ providedIn: 'root' }]
6078
6227
  }] });
@@ -6090,9 +6239,9 @@ class NoPreloading {
6090
6239
  return of(null);
6091
6240
  }
6092
6241
  }
6093
- NoPreloading.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: NoPreloading, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6094
- NoPreloading.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: NoPreloading, providedIn: 'root' });
6095
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: NoPreloading, decorators: [{
6242
+ NoPreloading.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: NoPreloading, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6243
+ NoPreloading.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: NoPreloading, providedIn: 'root' });
6244
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: NoPreloading, decorators: [{
6096
6245
  type: Injectable,
6097
6246
  args: [{ providedIn: 'root' }]
6098
6247
  }] });
@@ -6140,7 +6289,15 @@ class RouterPreloader {
6140
6289
  }
6141
6290
  const injectorForCurrentRoute = (_a = route._injector) !== null && _a !== void 0 ? _a : injector;
6142
6291
  const injectorForChildren = (_b = route._loadedInjector) !== null && _b !== void 0 ? _b : injectorForCurrentRoute;
6143
- if ((route.loadChildren && !route._loadedRoutes) ||
6292
+ // Note that `canLoad` is only checked as a condition that prevents `loadChildren` and not
6293
+ // `loadComponent`. `canLoad` guards only block loading of child routes by design. This
6294
+ // happens as a consequence of needing to descend into children for route matching immediately
6295
+ // while component loading is deferred until route activation. Because `canLoad` guards can
6296
+ // have side effects, we cannot execute them here so we instead skip preloading altogether
6297
+ // when present. Lastly, it remains to be decided whether `canLoad` should behave this way
6298
+ // at all. Code splitting and lazy loading is separate from client-side authorization checks
6299
+ // and should not be used as a security measure to prevent loading of code.
6300
+ if ((route.loadChildren && !route._loadedRoutes && route.canLoad === undefined) ||
6144
6301
  (route.loadComponent && !route._loadedComponent)) {
6145
6302
  res.push(this.preloadConfig(injectorForCurrentRoute, route));
6146
6303
  }
@@ -6180,9 +6337,9 @@ class RouterPreloader {
6180
6337
  });
6181
6338
  }
6182
6339
  }
6183
- RouterPreloader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterPreloader, deps: [{ token: Router }, { token: i0.Compiler }, { token: i0.EnvironmentInjector }, { token: PreloadingStrategy }, { token: RouterConfigLoader }], target: i0.ɵɵFactoryTarget.Injectable });
6184
- RouterPreloader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterPreloader });
6185
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterPreloader, decorators: [{
6340
+ RouterPreloader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: RouterPreloader, deps: [{ token: Router }, { token: i0.Compiler }, { token: i0.EnvironmentInjector }, { token: PreloadingStrategy }, { token: RouterConfigLoader }], target: i0.ɵɵFactoryTarget.Injectable });
6341
+ RouterPreloader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: RouterPreloader });
6342
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: RouterPreloader, decorators: [{
6186
6343
  type: Injectable
6187
6344
  }], ctorParameters: function () { return [{ type: Router }, { type: i0.Compiler }, { type: i0.EnvironmentInjector }, { type: PreloadingStrategy }, { type: RouterConfigLoader }]; } });
6188
6345
 
@@ -6262,9 +6419,9 @@ class RouterScroller {
6262
6419
  }
6263
6420
  }
6264
6421
  }
6265
- RouterScroller.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterScroller, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
6266
- RouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterScroller });
6267
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterScroller, decorators: [{
6422
+ RouterScroller.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: RouterScroller, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
6423
+ RouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: RouterScroller });
6424
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: RouterScroller, decorators: [{
6268
6425
  type: Injectable
6269
6426
  }], ctorParameters: function () { return [{ type: Router }, { type: i3.ViewportScroller }, { type: undefined }]; } });
6270
6427
 
@@ -6280,36 +6437,26 @@ const NG_DEV_MODE = typeof ngDevMode === 'undefined' || ngDevMode;
6280
6437
  * The directives defined in the `RouterModule`.
6281
6438
  */
6282
6439
  const ROUTER_DIRECTIVES = [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, ɵEmptyOutletComponent];
6283
- /**
6284
- * A [DI token](guide/glossary/#di-token) for the router service.
6285
- *
6286
- * @publicApi
6287
- */
6288
- const ROUTER_CONFIGURATION = new InjectionToken(NG_DEV_MODE ? 'router config' : 'ROUTER_CONFIGURATION', {
6289
- providedIn: 'root',
6290
- factory: () => ({}),
6291
- });
6292
6440
  /**
6293
6441
  * @docsNotRequired
6294
6442
  */
6295
6443
  const ROUTER_FORROOT_GUARD = new InjectionToken(NG_DEV_MODE ? 'router duplicate forRoot guard' : 'ROUTER_FORROOT_GUARD');
6296
6444
  const ROUTER_PRELOADER = new InjectionToken(NG_DEV_MODE ? 'router preloader' : '');
6445
+ // TODO(atscott): All of these except `ActivatedRoute` are `providedIn: 'root'`. They are only kept
6446
+ // here to avoid a breaking change whereby the provider order matters based on where the
6447
+ // `RouterModule`/`RouterTestingModule` is imported. These can/should be removed as a "breaking"
6448
+ // change in a major version.
6297
6449
  const ROUTER_PROVIDERS = [
6298
6450
  Location,
6299
6451
  { provide: UrlSerializer, useClass: DefaultUrlSerializer },
6300
- {
6301
- provide: Router,
6302
- useFactory: setupRouter,
6303
- deps: [
6304
- UrlSerializer, ChildrenOutletContexts, Location, Injector, Compiler, ROUTES, TitleStrategy,
6305
- ROUTER_CONFIGURATION, [UrlHandlingStrategy, new Optional()],
6306
- [RouteReuseStrategy, new Optional()]
6307
- ]
6308
- },
6452
+ { provide: Router, useFactory: setupRouter },
6309
6453
  ChildrenOutletContexts,
6310
6454
  { provide: ActivatedRoute, useFactory: rootRoute, deps: [Router] },
6311
6455
  RouterConfigLoader,
6312
6456
  ];
6457
+ function rootRoute(router) {
6458
+ return router.routerState.root;
6459
+ }
6313
6460
  function routerNgProbeToken() {
6314
6461
  return new NgProbeToken('Router', Router);
6315
6462
  }
@@ -6335,8 +6482,7 @@ function routerNgProbeToken() {
6335
6482
  * @publicApi
6336
6483
  */
6337
6484
  class RouterModule {
6338
- // Note: We are injecting the Router so it gets created eagerly...
6339
- constructor(guard, router) { }
6485
+ constructor(guard) { }
6340
6486
  /**
6341
6487
  * Creates and configures a module with all the router providers and directives.
6342
6488
  * Optionally sets up an application listener to perform an initial navigation.
@@ -6397,13 +6543,13 @@ class RouterModule {
6397
6543
  return { ngModule: RouterModule, providers: [provideRoutes(routes)] };
6398
6544
  }
6399
6545
  }
6400
- RouterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterModule, deps: [{ token: ROUTER_FORROOT_GUARD, optional: true }, { token: Router, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
6401
- RouterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.0", ngImport: i0, type: RouterModule, declarations: [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, ɵEmptyOutletComponent], exports: [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, ɵEmptyOutletComponent] });
6402
- RouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterModule });
6403
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterModule, decorators: [{
6546
+ RouterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: RouterModule, deps: [{ token: ROUTER_FORROOT_GUARD, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
6547
+ RouterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0-next.1", ngImport: i0, type: RouterModule, imports: [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, ɵEmptyOutletComponent], exports: [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, ɵEmptyOutletComponent] });
6548
+ RouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: RouterModule, imports: [ɵEmptyOutletComponent] });
6549
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: RouterModule, decorators: [{
6404
6550
  type: NgModule,
6405
6551
  args: [{
6406
- declarations: ROUTER_DIRECTIVES,
6552
+ imports: ROUTER_DIRECTIVES,
6407
6553
  exports: ROUTER_DIRECTIVES,
6408
6554
  }]
6409
6555
  }], ctorParameters: function () {
@@ -6412,8 +6558,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImpor
6412
6558
  }, {
6413
6559
  type: Inject,
6414
6560
  args: [ROUTER_FORROOT_GUARD]
6415
- }] }, { type: Router, decorators: [{
6416
- type: Optional
6417
6561
  }] }];
6418
6562
  } });
6419
6563
  function provideRouterScroller() {
@@ -6460,48 +6604,9 @@ function provideForRootGuard(router) {
6460
6604
  */
6461
6605
  function provideRoutes(routes) {
6462
6606
  return [
6463
- { provide: ANALYZE_FOR_ENTRY_COMPONENTS, multi: true, useValue: routes },
6464
6607
  { provide: ROUTES, multi: true, useValue: routes },
6465
6608
  ];
6466
6609
  }
6467
- function setupRouter(urlSerializer, contexts, location, injector, compiler, config, titleStrategy, opts = {}, urlHandlingStrategy, routeReuseStrategy) {
6468
- const router = new Router(null, urlSerializer, contexts, location, injector, compiler, flatten(config));
6469
- if (urlHandlingStrategy) {
6470
- router.urlHandlingStrategy = urlHandlingStrategy;
6471
- }
6472
- if (routeReuseStrategy) {
6473
- router.routeReuseStrategy = routeReuseStrategy;
6474
- }
6475
- router.titleStrategy = titleStrategy;
6476
- assignExtraOptionsToRouter(opts, router);
6477
- return router;
6478
- }
6479
- function assignExtraOptionsToRouter(opts, router) {
6480
- if (opts.errorHandler) {
6481
- router.errorHandler = opts.errorHandler;
6482
- }
6483
- if (opts.malformedUriErrorHandler) {
6484
- router.malformedUriErrorHandler = opts.malformedUriErrorHandler;
6485
- }
6486
- if (opts.onSameUrlNavigation) {
6487
- router.onSameUrlNavigation = opts.onSameUrlNavigation;
6488
- }
6489
- if (opts.paramsInheritanceStrategy) {
6490
- router.paramsInheritanceStrategy = opts.paramsInheritanceStrategy;
6491
- }
6492
- if (opts.relativeLinkResolution) {
6493
- router.relativeLinkResolution = opts.relativeLinkResolution;
6494
- }
6495
- if (opts.urlUpdateStrategy) {
6496
- router.urlUpdateStrategy = opts.urlUpdateStrategy;
6497
- }
6498
- if (opts.canceledNavigationResolution) {
6499
- router.canceledNavigationResolution = opts.canceledNavigationResolution;
6500
- }
6501
- }
6502
- function rootRoute(router) {
6503
- return router.routerState.root;
6504
- }
6505
6610
  function getBootstrapListener() {
6506
6611
  const injector = inject(Injector);
6507
6612
  return (bootstrappedComponentRef) => {
@@ -6512,8 +6617,7 @@ function getBootstrapListener() {
6512
6617
  }
6513
6618
  const router = injector.get(Router);
6514
6619
  const bootstrapDone = injector.get(BOOTSTRAP_DONE);
6515
- // Default case
6516
- if (injector.get(INITIAL_NAVIGATION, null, InjectFlags.Optional) === null) {
6620
+ if (injector.get(INITIAL_NAVIGATION) === 1 /* InitialNavigation.EnabledNonBlocking */) {
6517
6621
  router.initialNavigation();
6518
6622
  }
6519
6623
  (_a = injector.get(ROUTER_PRELOADER, null, InjectFlags.Optional)) === null || _a === void 0 ? void 0 : _a.setUpPreloading();
@@ -6557,7 +6661,7 @@ const BOOTSTRAP_DONE = new InjectionToken(NG_DEV_MODE ? 'bootstrap done indicato
6557
6661
  });
6558
6662
  function provideEnabledBlockingInitialNavigation() {
6559
6663
  return [
6560
- { provide: INITIAL_NAVIGATION, useValue: 'enabledBlocking' },
6664
+ { provide: INITIAL_NAVIGATION, useValue: 0 /* InitialNavigation.EnabledBlocking */ },
6561
6665
  {
6562
6666
  provide: APP_INITIALIZER,
6563
6667
  multi: true,
@@ -6623,7 +6727,7 @@ function provideEnabledBlockingInitialNavigation() {
6623
6727
  },
6624
6728
  ];
6625
6729
  }
6626
- const INITIAL_NAVIGATION = new InjectionToken(NG_DEV_MODE ? 'initial navigation' : '');
6730
+ const INITIAL_NAVIGATION = new InjectionToken(NG_DEV_MODE ? 'initial navigation' : '', { providedIn: 'root', factory: () => 1 /* InitialNavigation.EnabledNonBlocking */ });
6627
6731
  function provideDisabledInitialNavigation() {
6628
6732
  return [
6629
6733
  {
@@ -6636,7 +6740,7 @@ function provideDisabledInitialNavigation() {
6636
6740
  };
6637
6741
  }
6638
6742
  },
6639
- { provide: INITIAL_NAVIGATION, useValue: 'disabled' }
6743
+ { provide: INITIAL_NAVIGATION, useValue: 2 /* InitialNavigation.Disabled */ }
6640
6744
  ];
6641
6745
  }
6642
6746
  function provideTracing() {
@@ -6680,7 +6784,7 @@ function providePreloading(preloadingStrategy) {
6680
6784
  /**
6681
6785
  * @publicApi
6682
6786
  */
6683
- const VERSION = new Version('14.1.0');
6787
+ const VERSION = new Version('14.2.0-next.1');
6684
6788
 
6685
6789
  /**
6686
6790
  * @license
@@ -6719,5 +6823,5 @@ const VERSION = new Version('14.1.0');
6719
6823
  * Generated bundle index. Do not edit.
6720
6824
  */
6721
6825
 
6722
- export { ActivatedRoute, ActivatedRouteSnapshot, ActivationEnd, ActivationStart, BaseRouteReuseStrategy, ChildActivationEnd, ChildActivationStart, ChildrenOutletContexts, DefaultTitleStrategy, DefaultUrlSerializer, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, NoPreloading, OutletContext, PRIMARY_OUTLET, PreloadAllModules, PreloadingStrategy, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, ROUTES, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouteReuseStrategy, Router, RouterEvent, RouterLink, RouterLinkActive, RouterLinkWithHref, RouterModule, RouterOutlet, RouterPreloader, RouterState, RouterStateSnapshot, RoutesRecognized, Scroll, TitleStrategy, UrlHandlingStrategy, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree, VERSION, convertToParamMap, createUrlTreeFromSnapshot, provideRoutes, ɵEmptyOutletComponent, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS, assignExtraOptionsToRouter as ɵassignExtraOptionsToRouter, flatten as ɵflatten, providePreloading as ɵprovidePreloading };
6826
+ export { ActivatedRoute, ActivatedRouteSnapshot, ActivationEnd, ActivationStart, BaseRouteReuseStrategy, ChildActivationEnd, ChildActivationStart, ChildrenOutletContexts, DefaultTitleStrategy, DefaultUrlSerializer, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, NoPreloading, OutletContext, PRIMARY_OUTLET, PreloadAllModules, PreloadingStrategy, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, ROUTES, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouteReuseStrategy, Router, RouterEvent, RouterLink, RouterLinkActive, RouterLinkWithHref, RouterModule, RouterOutlet, RouterPreloader, RouterState, RouterStateSnapshot, RoutesRecognized, Scroll, TitleStrategy, UrlHandlingStrategy, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree, VERSION, convertToParamMap, createUrlTreeFromSnapshot, defaultUrlMatcher, provideRoutes, ɵEmptyOutletComponent, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS, assignExtraOptionsToRouter as ɵassignExtraOptionsToRouter, flatten as ɵflatten, providePreloading as ɵprovidePreloading };
6723
6827
  //# sourceMappingURL=router.mjs.map