@angular/router 15.0.2 → 15.0.4

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 (35) hide show
  1. package/esm2020/src/components/empty_outlet.mjs +3 -3
  2. package/esm2020/src/create_url_tree.mjs +2 -2
  3. package/esm2020/src/create_url_tree_strategy.mjs +67 -0
  4. package/esm2020/src/directives/router_link.mjs +3 -3
  5. package/esm2020/src/directives/router_link_active.mjs +3 -3
  6. package/esm2020/src/directives/router_outlet.mjs +3 -3
  7. package/esm2020/src/navigation_transition.mjs +3 -3
  8. package/esm2020/src/page_title_strategy.mjs +6 -6
  9. package/esm2020/src/private_export.mjs +1 -2
  10. package/esm2020/src/provide_router.mjs +1 -5
  11. package/esm2020/src/route_reuse_strategy.mjs +6 -6
  12. package/esm2020/src/router.mjs +28 -75
  13. package/esm2020/src/router_config_loader.mjs +5 -5
  14. package/esm2020/src/router_module.mjs +7 -7
  15. package/esm2020/src/router_outlet_context.mjs +3 -3
  16. package/esm2020/src/router_preloader.mjs +9 -9
  17. package/esm2020/src/router_scroller.mjs +3 -3
  18. package/esm2020/src/url_handling_strategy.mjs +6 -6
  19. package/esm2020/src/url_tree.mjs +3 -3
  20. package/esm2020/src/version.mjs +1 -1
  21. package/esm2020/testing/src/router_testing_module.mjs +47 -55
  22. package/fesm2015/router.mjs +163 -146
  23. package/fesm2015/router.mjs.map +1 -1
  24. package/fesm2015/testing.mjs +48 -56
  25. package/fesm2015/testing.mjs.map +1 -1
  26. package/fesm2015/upgrade.mjs +1 -1
  27. package/fesm2020/router.mjs +162 -145
  28. package/fesm2020/router.mjs.map +1 -1
  29. package/fesm2020/testing.mjs +48 -56
  30. package/fesm2020/testing.mjs.map +1 -1
  31. package/fesm2020/upgrade.mjs +1 -1
  32. package/index.d.ts +9 -15
  33. package/package.json +4 -4
  34. package/testing/index.d.ts +1 -7
  35. package/upgrade/index.d.ts +1 -1
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @license Angular v15.0.2
2
+ * @license Angular v15.0.4
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, Injectable, EventEmitter, inject, ViewContainerRef, ChangeDetectorRef, EnvironmentInjector, Directive, Input, Output, Component, createEnvironmentInjector, ɵisStandalone, ComponentFactoryResolver, ɵisInjectable, InjectionToken, InjectFlags, NgModuleFactory, Injector, Compiler, ɵConsole, NgZone, ɵcoerceToBoolean, ɵɵsanitizeUrlOrResourceUrl, Attribute, HostBinding, HostListener, Optional, ContentChildren, makeEnvironmentProviders, APP_BOOTSTRAP_LISTENER, ENVIRONMENT_INITIALIZER, ApplicationRef, APP_INITIALIZER, NgProbeToken, SkipSelf, NgModule, Inject, Version } from '@angular/core';
8
+ import { ɵisObservable, ɵisPromise, ɵRuntimeError, Injectable, EventEmitter, inject, ViewContainerRef, ChangeDetectorRef, EnvironmentInjector, Directive, Input, Output, Component, createEnvironmentInjector, ɵisStandalone, ComponentFactoryResolver, ɵisInjectable, InjectionToken, InjectFlags, NgModuleFactory, ɵConsole, NgZone, ɵcoerceToBoolean, ɵɵsanitizeUrlOrResourceUrl, Attribute, HostBinding, HostListener, Optional, ContentChildren, makeEnvironmentProviders, APP_BOOTSTRAP_LISTENER, ENVIRONMENT_INITIALIZER, Injector, ApplicationRef, APP_INITIALIZER, NgProbeToken, SkipSelf, NgModule, Inject, Version } from '@angular/core';
9
9
  import { from, of, BehaviorSubject, EmptyError, combineLatest, concat, defer, pipe, throwError, Observable, EMPTY, ConnectableObservable, Subject } from 'rxjs';
10
10
  import * as i3 from '@angular/common';
11
11
  import { Location, ViewportScroller, LOCATION_INITIALIZED, LocationStrategy, HashLocationStrategy, PathLocationStrategy } from '@angular/common';
@@ -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$a = typeof ngDevMode === 'undefined' || ngDevMode;
205
+ const NG_DEV_MODE$b = 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$a) {
330
+ if (NG_DEV_MODE$b) {
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.2", ngImport: i0, type: UrlSerializer, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
465
- UrlSerializer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: UrlSerializer, providedIn: 'root', useFactory: () => new DefaultUrlSerializer() });
466
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: UrlSerializer, decorators: [{
464
+ UrlSerializer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: UrlSerializer, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
465
+ UrlSerializer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: UrlSerializer, providedIn: 'root', useFactory: () => new DefaultUrlSerializer() });
466
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", 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$a && `Empty path url segment cannot have parameters: '${this.remaining}'.`);
678
+ throw new ɵRuntimeError(4009 /* RuntimeErrorCode.EMPTY_PATH_WITH_PARAMS */, NG_DEV_MODE$b && `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$a && `Cannot parse url '${this.url}'`);
747
+ throw new ɵRuntimeError(4010 /* RuntimeErrorCode.UNPARSABLE_URL */, NG_DEV_MODE$b && `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$a && `Expected "${str}".`);
778
+ throw new ɵRuntimeError(4011 /* RuntimeErrorCode.UNEXPECTED_VALUE_IN_URL */, NG_DEV_MODE$b && `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$9 = typeof ngDevMode === 'undefined' || ngDevMode;
831
+ const NG_DEV_MODE$a = 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$9 && 'Root segment cannot have matrix parameters');
1002
+ throw new ɵRuntimeError(4003 /* RuntimeErrorCode.ROOT_SEGMENT_MATRIX_PARAMS */, NG_DEV_MODE$a && '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$9 && '{outlets:{}} has to be the last command');
1006
+ throw new ɵRuntimeError(4004 /* RuntimeErrorCode.MISPLACED_OUTLETS_COMMAND */, NG_DEV_MODE$a && '{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$9 && 'Invalid number of \'../\'');
1105
+ throw new ɵRuntimeError(4005 /* RuntimeErrorCode.INVALID_DOUBLE_DOTS */, NG_DEV_MODE$a && 'Invalid number of \'../\'');
1106
1106
  }
1107
1107
  ci = g.segments.length;
1108
1108
  }
@@ -1726,6 +1726,70 @@ function stringifyEvent(routerEvent) {
1726
1726
  }
1727
1727
  }
1728
1728
 
1729
+ /**
1730
+ * @license
1731
+ * Copyright Google LLC All Rights Reserved.
1732
+ *
1733
+ * Use of this source code is governed by an MIT-style license that can be
1734
+ * found in the LICENSE file at https://angular.io/license
1735
+ */
1736
+ const NG_DEV_MODE$9 = typeof ngDevMode === 'undefined' || ngDevMode;
1737
+ class LegacyCreateUrlTree {
1738
+ createUrlTree(relativeTo, currentState, currentUrlTree, commands, queryParams, fragment) {
1739
+ const a = relativeTo || currentState.root;
1740
+ return createUrlTree(a, currentUrlTree, commands, queryParams, fragment);
1741
+ }
1742
+ }
1743
+ LegacyCreateUrlTree.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LegacyCreateUrlTree, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1744
+ LegacyCreateUrlTree.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LegacyCreateUrlTree });
1745
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LegacyCreateUrlTree, decorators: [{
1746
+ type: Injectable
1747
+ }] });
1748
+ class CreateUrlTreeUsingSnapshot {
1749
+ createUrlTree(relativeTo, currentState, currentUrlTree, commands, queryParams, fragment) {
1750
+ let relativeToUrlSegmentGroup;
1751
+ try {
1752
+ const relativeToSnapshot = relativeTo ? relativeTo.snapshot : currentState.snapshot.root;
1753
+ relativeToUrlSegmentGroup = createSegmentGroupFromRoute(relativeToSnapshot);
1754
+ }
1755
+ catch (e) {
1756
+ // This is strictly for backwards compatibility with tests that create
1757
+ // invalid `ActivatedRoute` mocks.
1758
+ // Note: the difference between having this fallback for invalid `ActivatedRoute` setups and
1759
+ // just throwing is ~500 test failures. Fixing all of those tests by hand is not feasible at
1760
+ // the moment.
1761
+ if (NG_DEV_MODE$9) {
1762
+ console.warn(`The ActivatedRoute has an invalid structure. This is likely due to an incomplete mock in tests.`);
1763
+ }
1764
+ if (typeof commands[0] !== 'string' || !commands[0].startsWith('/')) {
1765
+ // Navigations that were absolute in the old way of creating UrlTrees
1766
+ // would still work because they wouldn't attempt to match the
1767
+ // segments in the `ActivatedRoute` to the `currentUrlTree` but
1768
+ // instead just replace the root segment with the navigation result.
1769
+ // Non-absolute navigations would fail to apply the commands because
1770
+ // the logic could not find the segment to replace (so they'd act like there were no
1771
+ // commands).
1772
+ commands = [];
1773
+ }
1774
+ relativeToUrlSegmentGroup = currentUrlTree.root;
1775
+ }
1776
+ return createUrlTreeFromSegmentGroup(relativeToUrlSegmentGroup, commands, queryParams, fragment);
1777
+ }
1778
+ }
1779
+ CreateUrlTreeUsingSnapshot.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CreateUrlTreeUsingSnapshot, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1780
+ CreateUrlTreeUsingSnapshot.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CreateUrlTreeUsingSnapshot });
1781
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CreateUrlTreeUsingSnapshot, decorators: [{
1782
+ type: Injectable
1783
+ }] });
1784
+ class CreateUrlTreeStrategy {
1785
+ }
1786
+ CreateUrlTreeStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CreateUrlTreeStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1787
+ CreateUrlTreeStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CreateUrlTreeStrategy, providedIn: 'root', useClass: LegacyCreateUrlTree });
1788
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CreateUrlTreeStrategy, decorators: [{
1789
+ type: Injectable,
1790
+ args: [{ providedIn: 'root', useClass: LegacyCreateUrlTree }]
1791
+ }] });
1792
+
1729
1793
  /**
1730
1794
  * @license
1731
1795
  * Copyright Google LLC All Rights Reserved.
@@ -2386,9 +2450,9 @@ class ChildrenOutletContexts {
2386
2450
  return this.contexts.get(childName) || null;
2387
2451
  }
2388
2452
  }
2389
- ChildrenOutletContexts.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ChildrenOutletContexts, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2390
- ChildrenOutletContexts.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ChildrenOutletContexts, providedIn: 'root' });
2391
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ChildrenOutletContexts, decorators: [{
2453
+ ChildrenOutletContexts.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ChildrenOutletContexts, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2454
+ ChildrenOutletContexts.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ChildrenOutletContexts, providedIn: 'root' });
2455
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ChildrenOutletContexts, decorators: [{
2392
2456
  type: Injectable,
2393
2457
  args: [{ providedIn: 'root' }]
2394
2458
  }] });
@@ -2609,9 +2673,9 @@ class RouterOutlet {
2609
2673
  this.activateEvents.emit(this.activated.instance);
2610
2674
  }
2611
2675
  }
2612
- RouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: RouterOutlet, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2613
- RouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", 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.2", ngImport: i0, type: RouterOutlet, decorators: [{
2676
+ RouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterOutlet, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2677
+ RouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.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 });
2678
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterOutlet, decorators: [{
2615
2679
  type: Directive,
2616
2680
  args: [{
2617
2681
  selector: 'router-outlet',
@@ -2671,9 +2735,9 @@ function isComponentFactoryResolver(item) {
2671
2735
  */
2672
2736
  class ɵEmptyOutletComponent {
2673
2737
  }
2674
- ɵEmptyOutletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ɵEmptyOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2675
- ɵEmptyOutletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", 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.2", ngImport: i0, type: ɵEmptyOutletComponent, decorators: [{
2738
+ ɵEmptyOutletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ɵEmptyOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2739
+ ɵEmptyOutletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.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"] }] });
2740
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ɵEmptyOutletComponent, decorators: [{
2677
2741
  type: Component,
2678
2742
  args: [{
2679
2743
  template: `<router-outlet></router-outlet>`,
@@ -4334,7 +4398,7 @@ const NG_DEV_MODE$5 = typeof ngDevMode === 'undefined' || !!ngDevMode;
4334
4398
  * `ROUTES` is a low level API for router configuration via dependency injection.
4335
4399
  *
4336
4400
  * We recommend that in almost all cases to use higher level APIs such as `RouterModule.forRoot()`,
4337
- * `RouterModule.forChild()`, `provideRoutes`, or `Router.resetConfig()`.
4401
+ * `provideRouter`, or `Router.resetConfig()`.
4338
4402
  *
4339
4403
  * @publicApi
4340
4404
  */
@@ -4432,9 +4496,9 @@ class RouterConfigLoader {
4432
4496
  }));
4433
4497
  }
4434
4498
  }
4435
- RouterConfigLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: RouterConfigLoader, deps: [{ token: i0.Injector }, { token: i0.Compiler }], target: i0.ɵɵFactoryTarget.Injectable });
4436
- RouterConfigLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: RouterConfigLoader, providedIn: 'root' });
4437
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: RouterConfigLoader, decorators: [{
4499
+ RouterConfigLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterConfigLoader, deps: [{ token: i0.Injector }, { token: i0.Compiler }], target: i0.ɵɵFactoryTarget.Injectable });
4500
+ RouterConfigLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterConfigLoader, providedIn: 'root' });
4501
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterConfigLoader, decorators: [{
4438
4502
  type: Injectable,
4439
4503
  args: [{ providedIn: 'root' }]
4440
4504
  }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.Compiler }]; } });
@@ -4795,9 +4859,9 @@ class NavigationTransitions {
4795
4859
  t.resolve(false);
4796
4860
  }
4797
4861
  }
4798
- NavigationTransitions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: NavigationTransitions, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4799
- NavigationTransitions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: NavigationTransitions, providedIn: 'root' });
4800
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: NavigationTransitions, decorators: [{
4862
+ NavigationTransitions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NavigationTransitions, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4863
+ NavigationTransitions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NavigationTransitions, providedIn: 'root' });
4864
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NavigationTransitions, decorators: [{
4801
4865
  type: Injectable,
4802
4866
  args: [{ providedIn: 'root' }]
4803
4867
  }], ctorParameters: function () { return []; } });
@@ -4857,9 +4921,9 @@ class TitleStrategy {
4857
4921
  return snapshot.data[RouteTitleKey];
4858
4922
  }
4859
4923
  }
4860
- TitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TitleStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4861
- TitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TitleStrategy, providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) });
4862
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TitleStrategy, decorators: [{
4924
+ TitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TitleStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4925
+ TitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TitleStrategy, providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) });
4926
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TitleStrategy, decorators: [{
4863
4927
  type: Injectable,
4864
4928
  args: [{ providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) }]
4865
4929
  }] });
@@ -4883,9 +4947,9 @@ class DefaultTitleStrategy extends TitleStrategy {
4883
4947
  }
4884
4948
  }
4885
4949
  }
4886
- DefaultTitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DefaultTitleStrategy, deps: [{ token: i1.Title }], target: i0.ɵɵFactoryTarget.Injectable });
4887
- DefaultTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DefaultTitleStrategy, providedIn: 'root' });
4888
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DefaultTitleStrategy, decorators: [{
4950
+ DefaultTitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DefaultTitleStrategy, deps: [{ token: i1.Title }], target: i0.ɵɵFactoryTarget.Injectable });
4951
+ DefaultTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DefaultTitleStrategy, providedIn: 'root' });
4952
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DefaultTitleStrategy, decorators: [{
4889
4953
  type: Injectable,
4890
4954
  args: [{ providedIn: 'root' }]
4891
4955
  }], ctorParameters: function () { return [{ type: i1.Title }]; } });
@@ -4906,9 +4970,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
4906
4970
  */
4907
4971
  class RouteReuseStrategy {
4908
4972
  }
4909
- RouteReuseStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: RouteReuseStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4910
- RouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: RouteReuseStrategy, providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) });
4911
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: RouteReuseStrategy, decorators: [{
4973
+ RouteReuseStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouteReuseStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4974
+ RouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouteReuseStrategy, providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) });
4975
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouteReuseStrategy, decorators: [{
4912
4976
  type: Injectable,
4913
4977
  args: [{ providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) }]
4914
4978
  }] });
@@ -4960,9 +5024,9 @@ class BaseRouteReuseStrategy {
4960
5024
  }
4961
5025
  class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {
4962
5026
  }
4963
- DefaultRouteReuseStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DefaultRouteReuseStrategy, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
4964
- DefaultRouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DefaultRouteReuseStrategy, providedIn: 'root' });
4965
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DefaultRouteReuseStrategy, decorators: [{
5027
+ DefaultRouteReuseStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DefaultRouteReuseStrategy, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
5028
+ DefaultRouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DefaultRouteReuseStrategy, providedIn: 'root' });
5029
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DefaultRouteReuseStrategy, decorators: [{
4966
5030
  type: Injectable,
4967
5031
  args: [{ providedIn: 'root' }]
4968
5032
  }] });
@@ -5001,9 +5065,9 @@ const ROUTER_CONFIGURATION = new InjectionToken(NG_DEV_MODE$3 ? 'router config'
5001
5065
  */
5002
5066
  class UrlHandlingStrategy {
5003
5067
  }
5004
- UrlHandlingStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: UrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5005
- UrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: UrlHandlingStrategy, providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) });
5006
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: UrlHandlingStrategy, decorators: [{
5068
+ UrlHandlingStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: UrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5069
+ UrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: UrlHandlingStrategy, providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) });
5070
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: UrlHandlingStrategy, decorators: [{
5007
5071
  type: Injectable,
5008
5072
  args: [{ providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) }]
5009
5073
  }] });
@@ -5021,9 +5085,9 @@ class DefaultUrlHandlingStrategy {
5021
5085
  return newUrlPart;
5022
5086
  }
5023
5087
  }
5024
- DefaultUrlHandlingStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DefaultUrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5025
- DefaultUrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DefaultUrlHandlingStrategy, providedIn: 'root' });
5026
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DefaultUrlHandlingStrategy, decorators: [{
5088
+ DefaultUrlHandlingStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DefaultUrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5089
+ DefaultUrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DefaultUrlHandlingStrategy, providedIn: 'root' });
5090
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DefaultUrlHandlingStrategy, decorators: [{
5027
5091
  type: Injectable,
5028
5092
  args: [{ providedIn: 'root' }]
5029
5093
  }] });
@@ -5062,39 +5126,6 @@ const subsetMatchOptions = {
5062
5126
  matrixParams: 'ignored',
5063
5127
  queryParams: 'subset'
5064
5128
  };
5065
- function assignExtraOptionsToRouter(opts, router) {
5066
- if (opts.errorHandler) {
5067
- router.errorHandler = opts.errorHandler;
5068
- }
5069
- if (opts.malformedUriErrorHandler) {
5070
- router.malformedUriErrorHandler = opts.malformedUriErrorHandler;
5071
- }
5072
- if (opts.onSameUrlNavigation) {
5073
- router.onSameUrlNavigation = opts.onSameUrlNavigation;
5074
- }
5075
- if (opts.paramsInheritanceStrategy) {
5076
- router.paramsInheritanceStrategy = opts.paramsInheritanceStrategy;
5077
- }
5078
- if (opts.urlUpdateStrategy) {
5079
- router.urlUpdateStrategy = opts.urlUpdateStrategy;
5080
- }
5081
- if (opts.canceledNavigationResolution) {
5082
- router.canceledNavigationResolution = opts.canceledNavigationResolution;
5083
- }
5084
- }
5085
- function setupRouter() {
5086
- var _a, _b;
5087
- const urlSerializer = inject(UrlSerializer);
5088
- const contexts = inject(ChildrenOutletContexts);
5089
- const location = inject(Location);
5090
- const injector = inject(Injector);
5091
- const compiler = inject(Compiler);
5092
- const config = (_a = inject(ROUTES, { optional: true })) !== null && _a !== void 0 ? _a : [];
5093
- const opts = (_b = inject(ROUTER_CONFIGURATION, { optional: true })) !== null && _b !== void 0 ? _b : {};
5094
- const router = new Router(null, urlSerializer, contexts, location, injector, compiler, flatten(config));
5095
- assignExtraOptionsToRouter(opts, router);
5096
- return router;
5097
- }
5098
5129
  /**
5099
5130
  * @description
5100
5131
  *
@@ -5108,18 +5139,8 @@ function setupRouter() {
5108
5139
  * @publicApi
5109
5140
  */
5110
5141
  class Router {
5111
- /**
5112
- * Creates the router service.
5113
- */
5114
- // TODO: vsavkin make internal after the final is out.
5115
- constructor(
5116
- /** @internal */
5117
- rootComponentType, urlSerializer, rootContexts, location, injector, compiler, config) {
5118
- this.rootComponentType = rootComponentType;
5119
- this.urlSerializer = urlSerializer;
5120
- this.rootContexts = rootContexts;
5121
- this.location = location;
5122
- this.config = config;
5142
+ constructor() {
5143
+ var _a;
5123
5144
  this.disposed = false;
5124
5145
  /**
5125
5146
  * The id of the currently active page in the router.
@@ -5130,18 +5151,20 @@ class Router {
5130
5151
  * page.
5131
5152
  */
5132
5153
  this.currentPageId = 0;
5154
+ this.console = inject(ɵConsole);
5133
5155
  this.isNgZoneEnabled = false;
5156
+ this.options = inject(ROUTER_CONFIGURATION, { optional: true }) || {};
5134
5157
  /**
5135
5158
  * A handler for navigation errors in this NgModule.
5136
5159
  */
5137
- this.errorHandler = defaultErrorHandler;
5160
+ this.errorHandler = this.options.errorHandler || defaultErrorHandler;
5138
5161
  /**
5139
5162
  * A handler for errors thrown by `Router.parseUrl(url)`
5140
5163
  * when `url` contains an invalid character.
5141
5164
  * The most common case is a `%` sign
5142
5165
  * that's not encoded and is not part of a percent encoded sequence.
5143
5166
  */
5144
- this.malformedUriErrorHandler = defaultMalformedUriErrorHandler;
5167
+ this.malformedUriErrorHandler = this.options.malformedUriErrorHandler || defaultMalformedUriErrorHandler;
5145
5168
  /**
5146
5169
  * True if at least one navigation event has occurred,
5147
5170
  * false otherwise.
@@ -5164,6 +5187,8 @@ class Router {
5164
5187
  * A strategy for re-using routes.
5165
5188
  */
5166
5189
  this.routeReuseStrategy = inject(RouteReuseStrategy);
5190
+ /** Strategy used to create a UrlTree. */
5191
+ this.urlCreationStrategy = inject(CreateUrlTreeStrategy);
5167
5192
  /**
5168
5193
  * A strategy for setting the title based on the `routerState`.
5169
5194
  */
@@ -5181,7 +5206,7 @@ class Router {
5181
5206
  * routed components on same url navigation, you need to set `onSameUrlNavigation` to `'reload'`
5182
5207
  * _and_ provide a `RouteReuseStrategy` which returns `false` for `shouldReuseRoute`.
5183
5208
  */
5184
- this.onSameUrlNavigation = 'ignore';
5209
+ this.onSameUrlNavigation = this.options.onSameUrlNavigation || 'ignore';
5185
5210
  /**
5186
5211
  * How to merge parameters, data, resolved data, and title from parent to child
5187
5212
  * routes. One of:
@@ -5191,7 +5216,7 @@ class Router {
5191
5216
  * - `'always'` : Inherit parent parameters, data, and resolved data
5192
5217
  * for all child routes.
5193
5218
  */
5194
- this.paramsInheritanceStrategy = 'emptyOnly';
5219
+ this.paramsInheritanceStrategy = this.options.paramsInheritanceStrategy || 'emptyOnly';
5195
5220
  /**
5196
5221
  * Determines when the router updates the browser URL.
5197
5222
  * By default (`"deferred"`), updates the browser URL after navigation has finished.
@@ -5199,7 +5224,7 @@ class Router {
5199
5224
  * You can choose to update early so that, if navigation fails,
5200
5225
  * you can show an error message with the URL that failed.
5201
5226
  */
5202
- this.urlUpdateStrategy = 'deferred';
5227
+ this.urlUpdateStrategy = this.options.urlUpdateStrategy || 'deferred';
5203
5228
  /**
5204
5229
  * Configures how the Router attempts to restore state when a navigation is cancelled.
5205
5230
  *
@@ -5222,12 +5247,15 @@ class Router {
5222
5247
  * The default value is `replace`.
5223
5248
  *
5224
5249
  */
5225
- this.canceledNavigationResolution = 'replace';
5250
+ this.canceledNavigationResolution = this.options.canceledNavigationResolution || 'replace';
5251
+ this.config = flatten((_a = inject(ROUTES, { optional: true })) !== null && _a !== void 0 ? _a : []);
5226
5252
  this.navigationTransitions = inject(NavigationTransitions);
5227
- this.console = injector.get(ɵConsole);
5228
- const ngZone = injector.get(NgZone);
5229
- this.isNgZoneEnabled = ngZone instanceof NgZone && NgZone.isInAngularZone();
5230
- this.resetConfig(config);
5253
+ this.urlSerializer = inject(UrlSerializer);
5254
+ this.location = inject(Location);
5255
+ /** @internal */
5256
+ this.rootComponentType = null;
5257
+ this.isNgZoneEnabled = inject(NgZone) instanceof NgZone && NgZone.isInAngularZone();
5258
+ this.resetConfig(this.config);
5231
5259
  this.currentUrlTree = new UrlTree();
5232
5260
  this.rawUrlTree = this.currentUrlTree;
5233
5261
  this.browserUrlTree = this.currentUrlTree;
@@ -5263,10 +5291,7 @@ class Router {
5263
5291
  // the change.
5264
5292
  return this.navigationTransitions.events;
5265
5293
  }
5266
- /**
5267
- * @internal
5268
- * TODO: this should be removed once the constructor of the router made internal
5269
- */
5294
+ /** @internal */
5270
5295
  resetRootComponentType(rootComponentType) {
5271
5296
  this.rootComponentType = rootComponentType;
5272
5297
  // TODO: vsavkin router 4.0 should make the root component set to null
@@ -5421,7 +5446,6 @@ class Router {
5421
5446
  */
5422
5447
  createUrlTree(commands, navigationExtras = {}) {
5423
5448
  const { relativeTo, queryParams, fragment, queryParamsHandling, preserveFragment } = navigationExtras;
5424
- const a = relativeTo || this.routerState.root;
5425
5449
  const f = preserveFragment ? this.currentUrlTree.fragment : fragment;
5426
5450
  let q = null;
5427
5451
  switch (queryParamsHandling) {
@@ -5437,7 +5461,7 @@ class Router {
5437
5461
  if (q !== null) {
5438
5462
  q = this.removeEmptyProps(q);
5439
5463
  }
5440
- return createUrlTree(a, this.currentUrlTree, commands, q, f !== null && f !== void 0 ? f : null);
5464
+ return this.urlCreationStrategy.createUrlTree(relativeTo, this.routerState, this.currentUrlTree, commands, q, f !== null && f !== void 0 ? f : null);
5441
5465
  }
5442
5466
  /**
5443
5467
  * Navigates to a view using an absolute route path.
@@ -5693,15 +5717,12 @@ class Router {
5693
5717
  return { navigationId };
5694
5718
  }
5695
5719
  }
5696
- Router.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: Router, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
5697
- Router.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: Router, providedIn: 'root', useFactory: setupRouter });
5698
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: Router, decorators: [{
5720
+ Router.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: Router, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5721
+ Router.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: Router, providedIn: 'root' });
5722
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: Router, decorators: [{
5699
5723
  type: Injectable,
5700
- args: [{
5701
- providedIn: 'root',
5702
- useFactory: setupRouter,
5703
- }]
5704
- }], ctorParameters: function () { return [{ type: i0.Type }, { type: UrlSerializer }, { type: ChildrenOutletContexts }, { type: i3.Location }, { type: i0.Injector }, { type: i0.Compiler }, { type: undefined }]; } });
5724
+ args: [{ providedIn: 'root' }]
5725
+ }], ctorParameters: function () { return []; } });
5705
5726
  function validateCommands(commands) {
5706
5727
  for (let i = 0; i < commands.length; i++) {
5707
5728
  const cmd = commands[i];
@@ -5986,9 +6007,9 @@ class RouterLink {
5986
6007
  });
5987
6008
  }
5988
6009
  }
5989
- RouterLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", 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 });
5990
- RouterLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", 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 });
5991
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: RouterLink, decorators: [{
6010
+ RouterLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.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 });
6011
+ RouterLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.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 });
6012
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterLink, decorators: [{
5992
6013
  type: Directive,
5993
6014
  args: [{
5994
6015
  selector: '[routerLink]',
@@ -6217,9 +6238,9 @@ class RouterLinkActive {
6217
6238
  return this.link && isActiveCheckFn(this.link) || this.links.some(isActiveCheckFn);
6218
6239
  }
6219
6240
  }
6220
- RouterLinkActive.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: RouterLinkActive, deps: [{ token: Router }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: RouterLink, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
6221
- RouterLinkActive.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", 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 });
6222
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: RouterLinkActive, decorators: [{
6241
+ RouterLinkActive.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.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 });
6242
+ RouterLinkActive.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.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 });
6243
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterLinkActive, decorators: [{
6223
6244
  type: Directive,
6224
6245
  args: [{
6225
6246
  selector: '[routerLinkActive]',
@@ -6281,9 +6302,9 @@ class PreloadAllModules {
6281
6302
  return fn().pipe(catchError(() => of(null)));
6282
6303
  }
6283
6304
  }
6284
- PreloadAllModules.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: PreloadAllModules, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6285
- PreloadAllModules.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: PreloadAllModules, providedIn: 'root' });
6286
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: PreloadAllModules, decorators: [{
6305
+ PreloadAllModules.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PreloadAllModules, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6306
+ PreloadAllModules.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PreloadAllModules, providedIn: 'root' });
6307
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PreloadAllModules, decorators: [{
6287
6308
  type: Injectable,
6288
6309
  args: [{ providedIn: 'root' }]
6289
6310
  }] });
@@ -6301,9 +6322,9 @@ class NoPreloading {
6301
6322
  return of(null);
6302
6323
  }
6303
6324
  }
6304
- NoPreloading.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: NoPreloading, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6305
- NoPreloading.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: NoPreloading, providedIn: 'root' });
6306
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: NoPreloading, decorators: [{
6325
+ NoPreloading.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NoPreloading, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6326
+ NoPreloading.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NoPreloading, providedIn: 'root' });
6327
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NoPreloading, decorators: [{
6307
6328
  type: Injectable,
6308
6329
  args: [{ providedIn: 'root' }]
6309
6330
  }] });
@@ -6399,9 +6420,9 @@ class RouterPreloader {
6399
6420
  });
6400
6421
  }
6401
6422
  }
6402
- RouterPreloader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: RouterPreloader, deps: [{ token: Router }, { token: i0.Compiler }, { token: i0.EnvironmentInjector }, { token: PreloadingStrategy }, { token: RouterConfigLoader }], target: i0.ɵɵFactoryTarget.Injectable });
6403
- RouterPreloader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: RouterPreloader, providedIn: 'root' });
6404
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: RouterPreloader, decorators: [{
6423
+ RouterPreloader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterPreloader, deps: [{ token: Router }, { token: i0.Compiler }, { token: i0.EnvironmentInjector }, { token: PreloadingStrategy }, { token: RouterConfigLoader }], target: i0.ɵɵFactoryTarget.Injectable });
6424
+ RouterPreloader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterPreloader, providedIn: 'root' });
6425
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterPreloader, decorators: [{
6405
6426
  type: Injectable,
6406
6427
  args: [{ providedIn: 'root' }]
6407
6428
  }], ctorParameters: function () { return [{ type: Router }, { type: i0.Compiler }, { type: i0.EnvironmentInjector }, { type: PreloadingStrategy }, { type: RouterConfigLoader }]; } });
@@ -6490,9 +6511,9 @@ class RouterScroller {
6490
6511
  (_b = this.scrollEventsSubscription) === null || _b === void 0 ? void 0 : _b.unsubscribe();
6491
6512
  }
6492
6513
  }
6493
- RouterScroller.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: RouterScroller, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
6494
- RouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: RouterScroller });
6495
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: RouterScroller, decorators: [{
6514
+ RouterScroller.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterScroller, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
6515
+ RouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterScroller });
6516
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterScroller, decorators: [{
6496
6517
  type: Injectable
6497
6518
  }], ctorParameters: function () { return [{ type: UrlSerializer }, { type: NavigationTransitions }, { type: i3.ViewportScroller }, { type: i0.NgZone }, { type: undefined }]; } });
6498
6519
 
@@ -6547,10 +6568,6 @@ function provideRouter(routes, ...features) {
6547
6568
  { provide: ActivatedRoute, useFactory: rootRoute, deps: [Router] },
6548
6569
  { provide: APP_BOOTSTRAP_LISTENER, multi: true, useFactory: getBootstrapListener },
6549
6570
  features.map(feature => feature.ɵproviders),
6550
- // TODO: All options used by the `assignExtraOptionsToRouter` factory need to be reviewed for
6551
- // how we want them to be configured. This API doesn't currently have a way to configure them
6552
- // and we should decide what the _best_ way to do that is rather than just sticking with the
6553
- // status quo of how it's done today.
6554
6571
  ]);
6555
6572
  }
6556
6573
  function rootRoute(router) {
@@ -6940,7 +6957,7 @@ const ROUTER_FORROOT_GUARD = new InjectionToken(NG_DEV_MODE ? 'router duplicate
6940
6957
  const ROUTER_PROVIDERS = [
6941
6958
  Location,
6942
6959
  { provide: UrlSerializer, useClass: DefaultUrlSerializer },
6943
- { provide: Router, useFactory: setupRouter },
6960
+ Router,
6944
6961
  ChildrenOutletContexts,
6945
6962
  { provide: ActivatedRoute, useFactory: rootRoute, deps: [Router] },
6946
6963
  RouterConfigLoader,
@@ -7037,10 +7054,10 @@ class RouterModule {
7037
7054
  };
7038
7055
  }
7039
7056
  }
7040
- RouterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: RouterModule, deps: [{ token: ROUTER_FORROOT_GUARD, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
7041
- RouterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: RouterModule, imports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent], exports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent] });
7042
- RouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: RouterModule, imports: [ɵEmptyOutletComponent] });
7043
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: RouterModule, decorators: [{
7057
+ RouterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterModule, deps: [{ token: ROUTER_FORROOT_GUARD, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
7058
+ RouterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: RouterModule, imports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent], exports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent] });
7059
+ RouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterModule, imports: [ɵEmptyOutletComponent] });
7060
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterModule, decorators: [{
7044
7061
  type: NgModule,
7045
7062
  args: [{
7046
7063
  imports: ROUTER_DIRECTIVES,
@@ -7128,7 +7145,7 @@ function provideRouterInitializer() {
7128
7145
  /**
7129
7146
  * @publicApi
7130
7147
  */
7131
- const VERSION = new Version('15.0.2');
7148
+ const VERSION = new Version('15.0.4');
7132
7149
 
7133
7150
  /**
7134
7151
  * @license
@@ -7167,5 +7184,5 @@ const VERSION = new Version('15.0.2');
7167
7184
  * Generated bundle index. Do not edit.
7168
7185
  */
7169
7186
 
7170
- 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, RouterLink as RouterLinkWithHref, RouterModule, RouterOutlet, RouterPreloader, RouterState, RouterStateSnapshot, RoutesRecognized, Scroll, TitleStrategy, UrlHandlingStrategy, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree, VERSION, convertToParamMap, createUrlTreeFromSnapshot, defaultUrlMatcher, provideRouter, provideRoutes, withDebugTracing, withDisabledInitialNavigation, withEnabledBlockingInitialNavigation, withInMemoryScrolling, withPreloading, withRouterConfig, ɵEmptyOutletComponent, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS, assignExtraOptionsToRouter as ɵassignExtraOptionsToRouter, flatten as ɵflatten, withPreloading as ɵwithPreloading };
7187
+ 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, RouterLink as RouterLinkWithHref, RouterModule, RouterOutlet, RouterPreloader, RouterState, RouterStateSnapshot, RoutesRecognized, Scroll, TitleStrategy, UrlHandlingStrategy, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree, VERSION, convertToParamMap, createUrlTreeFromSnapshot, defaultUrlMatcher, provideRouter, provideRoutes, withDebugTracing, withDisabledInitialNavigation, withEnabledBlockingInitialNavigation, withInMemoryScrolling, withPreloading, withRouterConfig, ɵEmptyOutletComponent, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS, flatten as ɵflatten, withPreloading as ɵwithPreloading };
7171
7188
  //# sourceMappingURL=router.mjs.map