@angular/router 15.1.0-next.1 → 15.1.0-next.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/esm2020/src/components/empty_outlet.mjs +3 -3
  2. package/esm2020/src/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 +11 -8
  6. package/esm2020/src/directives/router_outlet.mjs +3 -3
  7. package/esm2020/src/index.mjs +2 -2
  8. package/esm2020/src/navigation_transition.mjs +8 -8
  9. package/esm2020/src/page_title_strategy.mjs +6 -6
  10. package/esm2020/src/private_export.mjs +1 -2
  11. package/esm2020/src/provide_router.mjs +32 -6
  12. package/esm2020/src/route_reuse_strategy.mjs +6 -6
  13. package/esm2020/src/router.mjs +49 -96
  14. package/esm2020/src/router_config_loader.mjs +5 -5
  15. package/esm2020/src/router_module.mjs +7 -7
  16. package/esm2020/src/router_outlet_context.mjs +3 -3
  17. package/esm2020/src/router_preloader.mjs +9 -9
  18. package/esm2020/src/router_scroller.mjs +3 -3
  19. package/esm2020/src/router_state.mjs +7 -7
  20. package/esm2020/src/url_handling_strategy.mjs +6 -6
  21. package/esm2020/src/url_tree.mjs +4 -4
  22. package/esm2020/src/utils/config.mjs +2 -2
  23. package/esm2020/src/version.mjs +1 -1
  24. package/esm2020/testing/src/router_testing_module.mjs +56 -17
  25. package/fesm2015/router.mjs +234 -184
  26. package/fesm2015/router.mjs.map +1 -1
  27. package/fesm2015/testing.mjs +56 -17
  28. package/fesm2015/testing.mjs.map +1 -1
  29. package/fesm2015/upgrade.mjs +1 -1
  30. package/fesm2020/router.mjs +231 -181
  31. package/fesm2020/router.mjs.map +1 -1
  32. package/fesm2020/testing.mjs +56 -17
  33. package/fesm2020/testing.mjs.map +1 -1
  34. package/fesm2020/upgrade.mjs +1 -1
  35. package/index.d.ts +49 -17
  36. package/package.json +4 -4
  37. package/testing/index.d.ts +1 -1
  38. package/upgrade/index.d.ts +1 -1
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @license Angular v15.1.0-next.1
2
+ * @license Angular v15.1.0-next.3
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.1.0-next.1", ngImport: i0, type: UrlSerializer, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
465
- UrlSerializer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: UrlSerializer, providedIn: 'root', useFactory: () => new DefaultUrlSerializer() });
466
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: UrlSerializer, decorators: [{
464
+ UrlSerializer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: UrlSerializer, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
465
+ UrlSerializer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: UrlSerializer, providedIn: 'root', useFactory: () => new DefaultUrlSerializer() });
466
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", 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
  *
@@ -997,11 +997,11 @@ class Navigation {
997
997
  this.numberOfDoubleDots = numberOfDoubleDots;
998
998
  this.commands = commands;
999
999
  if (isAbsolute && commands.length > 0 && isMatrixParams(commands[0])) {
1000
- throw new ɵRuntimeError(4003 /* RuntimeErrorCode.ROOT_SEGMENT_MATRIX_PARAMS */, NG_DEV_MODE$9 && 'Root segment cannot have matrix parameters');
1000
+ throw new ɵRuntimeError(4003 /* RuntimeErrorCode.ROOT_SEGMENT_MATRIX_PARAMS */, NG_DEV_MODE$a && 'Root segment cannot have matrix parameters');
1001
1001
  }
1002
1002
  const cmdWithOutlet = commands.find(isCommandWithOutlets);
1003
1003
  if (cmdWithOutlet && cmdWithOutlet !== last(commands)) {
1004
- throw new ɵRuntimeError(4004 /* RuntimeErrorCode.MISPLACED_OUTLETS_COMMAND */, NG_DEV_MODE$9 && '{outlets:{}} has to be the last command');
1004
+ throw new ɵRuntimeError(4004 /* RuntimeErrorCode.MISPLACED_OUTLETS_COMMAND */, NG_DEV_MODE$a && '{outlets:{}} has to be the last command');
1005
1005
  }
1006
1006
  }
1007
1007
  toRoot() {
@@ -1100,7 +1100,7 @@ function createPositionApplyingDoubleDots(group, index, numberOfDoubleDots) {
1100
1100
  dd -= ci;
1101
1101
  g = g.parent;
1102
1102
  if (!g) {
1103
- throw new ɵRuntimeError(4005 /* RuntimeErrorCode.INVALID_DOUBLE_DOTS */, NG_DEV_MODE$9 && 'Invalid number of \'../\'');
1103
+ throw new ɵRuntimeError(4005 /* RuntimeErrorCode.INVALID_DOUBLE_DOTS */, NG_DEV_MODE$a && 'Invalid number of \'../\'');
1104
1104
  }
1105
1105
  ci = g.segments.length;
1106
1106
  }
@@ -1756,6 +1756,70 @@ function stringifyEvent(routerEvent) {
1756
1756
  }
1757
1757
  }
1758
1758
 
1759
+ /**
1760
+ * @license
1761
+ * Copyright Google LLC All Rights Reserved.
1762
+ *
1763
+ * Use of this source code is governed by an MIT-style license that can be
1764
+ * found in the LICENSE file at https://angular.io/license
1765
+ */
1766
+ const NG_DEV_MODE$9 = typeof ngDevMode === 'undefined' || ngDevMode;
1767
+ class LegacyCreateUrlTree {
1768
+ createUrlTree(relativeTo, currentState, currentUrlTree, commands, queryParams, fragment) {
1769
+ const a = relativeTo || currentState.root;
1770
+ return createUrlTree(a, currentUrlTree, commands, queryParams, fragment);
1771
+ }
1772
+ }
1773
+ LegacyCreateUrlTree.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: LegacyCreateUrlTree, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1774
+ LegacyCreateUrlTree.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: LegacyCreateUrlTree });
1775
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: LegacyCreateUrlTree, decorators: [{
1776
+ type: Injectable
1777
+ }] });
1778
+ class CreateUrlTreeUsingSnapshot {
1779
+ createUrlTree(relativeTo, currentState, currentUrlTree, commands, queryParams, fragment) {
1780
+ let relativeToUrlSegmentGroup;
1781
+ try {
1782
+ const relativeToSnapshot = relativeTo ? relativeTo.snapshot : currentState.snapshot.root;
1783
+ relativeToUrlSegmentGroup = createSegmentGroupFromRoute(relativeToSnapshot);
1784
+ }
1785
+ catch (e) {
1786
+ // This is strictly for backwards compatibility with tests that create
1787
+ // invalid `ActivatedRoute` mocks.
1788
+ // Note: the difference between having this fallback for invalid `ActivatedRoute` setups and
1789
+ // just throwing is ~500 test failures. Fixing all of those tests by hand is not feasible at
1790
+ // the moment.
1791
+ if (NG_DEV_MODE$9) {
1792
+ console.warn(`The ActivatedRoute has an invalid structure. This is likely due to an incomplete mock in tests.`);
1793
+ }
1794
+ if (typeof commands[0] !== 'string' || !commands[0].startsWith('/')) {
1795
+ // Navigations that were absolute in the old way of creating UrlTrees
1796
+ // would still work because they wouldn't attempt to match the
1797
+ // segments in the `ActivatedRoute` to the `currentUrlTree` but
1798
+ // instead just replace the root segment with the navigation result.
1799
+ // Non-absolute navigations would fail to apply the commands because
1800
+ // the logic could not find the segment to replace (so they'd act like there were no
1801
+ // commands).
1802
+ commands = [];
1803
+ }
1804
+ relativeToUrlSegmentGroup = currentUrlTree.root;
1805
+ }
1806
+ return createUrlTreeFromSegmentGroup(relativeToUrlSegmentGroup, commands, queryParams, fragment);
1807
+ }
1808
+ }
1809
+ CreateUrlTreeUsingSnapshot.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: CreateUrlTreeUsingSnapshot, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1810
+ CreateUrlTreeUsingSnapshot.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: CreateUrlTreeUsingSnapshot });
1811
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: CreateUrlTreeUsingSnapshot, decorators: [{
1812
+ type: Injectable
1813
+ }] });
1814
+ class CreateUrlTreeStrategy {
1815
+ }
1816
+ CreateUrlTreeStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: CreateUrlTreeStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1817
+ CreateUrlTreeStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: CreateUrlTreeStrategy, providedIn: 'root', useClass: LegacyCreateUrlTree });
1818
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: CreateUrlTreeStrategy, decorators: [{
1819
+ type: Injectable,
1820
+ args: [{ providedIn: 'root', useClass: LegacyCreateUrlTree }]
1821
+ }] });
1822
+
1759
1823
  /**
1760
1824
  * @license
1761
1825
  * Copyright Google LLC All Rights Reserved.
@@ -2078,6 +2142,12 @@ function flattenInherited(pathFromRoot) {
2078
2142
  * @publicApi
2079
2143
  */
2080
2144
  class ActivatedRouteSnapshot {
2145
+ /** The resolved route title */
2146
+ get title() {
2147
+ // Note: This _must_ be a getter because the data is mutated in the resolvers. Title will not be
2148
+ // available at the time of class instantiation.
2149
+ return this.data?.[RouteTitleKey];
2150
+ }
2081
2151
  /** @internal */
2082
2152
  constructor(
2083
2153
  /** The URL segments matched by this route */
@@ -2124,12 +2194,6 @@ class ActivatedRouteSnapshot {
2124
2194
  this._lastPathIndex = lastPathIndex;
2125
2195
  this._resolve = resolve;
2126
2196
  }
2127
- /** The resolved route title */
2128
- get title() {
2129
- // Note: This _must_ be a getter because the data is mutated in the resolvers. Title will not be
2130
- // available at the time of class instantiation.
2131
- return this.data?.[RouteTitleKey];
2132
- }
2133
2197
  /** The root of the router state */
2134
2198
  get root() {
2135
2199
  return this._routerState.root;
@@ -2413,9 +2477,9 @@ class ChildrenOutletContexts {
2413
2477
  return this.contexts.get(childName) || null;
2414
2478
  }
2415
2479
  }
2416
- ChildrenOutletContexts.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: ChildrenOutletContexts, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2417
- ChildrenOutletContexts.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: ChildrenOutletContexts, providedIn: 'root' });
2418
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: ChildrenOutletContexts, decorators: [{
2480
+ ChildrenOutletContexts.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: ChildrenOutletContexts, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2481
+ ChildrenOutletContexts.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: ChildrenOutletContexts, providedIn: 'root' });
2482
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: ChildrenOutletContexts, decorators: [{
2419
2483
  type: Injectable,
2420
2484
  args: [{ providedIn: 'root' }]
2421
2485
  }] });
@@ -2635,9 +2699,9 @@ class RouterOutlet {
2635
2699
  this.activateEvents.emit(this.activated.instance);
2636
2700
  }
2637
2701
  }
2638
- RouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterOutlet, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2639
- RouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.0-next.1", type: RouterOutlet, isStandalone: true, selector: "router-outlet", inputs: { name: "name" }, outputs: { activateEvents: "activate", deactivateEvents: "deactivate", attachEvents: "attach", detachEvents: "detach" }, exportAs: ["outlet"], usesOnChanges: true, ngImport: i0 });
2640
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterOutlet, decorators: [{
2702
+ RouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: RouterOutlet, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2703
+ RouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.0-next.3", 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 });
2704
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: RouterOutlet, decorators: [{
2641
2705
  type: Directive,
2642
2706
  args: [{
2643
2707
  selector: 'router-outlet',
@@ -2697,9 +2761,9 @@ function isComponentFactoryResolver(item) {
2697
2761
  */
2698
2762
  class ɵEmptyOutletComponent {
2699
2763
  }
2700
- ɵEmptyOutletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: ɵEmptyOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2701
- ɵEmptyOutletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.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", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] });
2702
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: ɵEmptyOutletComponent, decorators: [{
2764
+ ɵEmptyOutletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: ɵEmptyOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2765
+ ɵEmptyOutletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.0-next.3", 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"] }] });
2766
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: ɵEmptyOutletComponent, decorators: [{
2703
2767
  type: Component,
2704
2768
  args: [{
2705
2769
  template: `<router-outlet></router-outlet>`,
@@ -2751,7 +2815,7 @@ function validateConfig(config, parentPath = '', requireStandaloneComponents = f
2751
2815
  }
2752
2816
  }
2753
2817
  function assertStandalone(fullPath, component) {
2754
- if (component && isStandalone(component)) {
2818
+ if (component && !isStandalone(component)) {
2755
2819
  throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}'. The component must be standalone.`);
2756
2820
  }
2757
2821
  }
@@ -4345,7 +4409,7 @@ const NG_DEV_MODE$5 = typeof ngDevMode === 'undefined' || !!ngDevMode;
4345
4409
  * `ROUTES` is a low level API for router configuration via dependency injection.
4346
4410
  *
4347
4411
  * We recommend that in almost all cases to use higher level APIs such as `RouterModule.forRoot()`,
4348
- * `RouterModule.forChild()`, `provideRoutes`, or `Router.resetConfig()`.
4412
+ * `provideRouter`, or `Router.resetConfig()`.
4349
4413
  *
4350
4414
  * @publicApi
4351
4415
  */
@@ -4442,9 +4506,9 @@ class RouterConfigLoader {
4442
4506
  }));
4443
4507
  }
4444
4508
  }
4445
- RouterConfigLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterConfigLoader, deps: [{ token: i0.Injector }, { token: i0.Compiler }], target: i0.ɵɵFactoryTarget.Injectable });
4446
- RouterConfigLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterConfigLoader, providedIn: 'root' });
4447
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterConfigLoader, decorators: [{
4509
+ RouterConfigLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: RouterConfigLoader, deps: [{ token: i0.Injector }, { token: i0.Compiler }], target: i0.ɵɵFactoryTarget.Injectable });
4510
+ RouterConfigLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: RouterConfigLoader, providedIn: 'root' });
4511
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: RouterConfigLoader, decorators: [{
4448
4512
  type: Injectable,
4449
4513
  args: [{ providedIn: 'root' }]
4450
4514
  }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.Compiler }]; } });
@@ -4469,6 +4533,9 @@ function maybeUnwrapDefaultExport(input) {
4469
4533
  */
4470
4534
  const NG_DEV_MODE$4 = typeof ngDevMode === 'undefined' || !!ngDevMode;
4471
4535
  class NavigationTransitions {
4536
+ get hasRequestedNavigation() {
4537
+ return this.navigationId !== 0;
4538
+ }
4472
4539
  constructor() {
4473
4540
  this.currentNavigation = null;
4474
4541
  this.lastSuccessfulNavigation = null;
@@ -4483,9 +4550,6 @@ class NavigationTransitions {
4483
4550
  this.configLoader.onLoadEndListener = onLoadEnd;
4484
4551
  this.configLoader.onLoadStartListener = onLoadStart;
4485
4552
  }
4486
- get hasRequestedNavigation() {
4487
- return this.navigationId !== 0;
4488
- }
4489
4553
  complete() {
4490
4554
  this.transitions?.complete();
4491
4555
  }
@@ -4812,7 +4876,7 @@ class NavigationTransitions {
4812
4876
  }
4813
4877
  return EMPTY;
4814
4878
  }));
4815
- // TODO(jasonaden): remove cast once g3 is on updated TypeScript
4879
+ // casting because `pipe` returns observable({}) when called with 8+ arguments
4816
4880
  }));
4817
4881
  }
4818
4882
  cancelNavigationTransition(t, reason, code, router) {
@@ -4821,9 +4885,9 @@ class NavigationTransitions {
4821
4885
  t.resolve(false);
4822
4886
  }
4823
4887
  }
4824
- NavigationTransitions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: NavigationTransitions, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4825
- NavigationTransitions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: NavigationTransitions, providedIn: 'root' });
4826
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: NavigationTransitions, decorators: [{
4888
+ NavigationTransitions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: NavigationTransitions, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4889
+ NavigationTransitions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: NavigationTransitions, providedIn: 'root' });
4890
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: NavigationTransitions, decorators: [{
4827
4891
  type: Injectable,
4828
4892
  args: [{ providedIn: 'root' }]
4829
4893
  }], ctorParameters: function () { return []; } });
@@ -4882,9 +4946,9 @@ class TitleStrategy {
4882
4946
  return snapshot.data[RouteTitleKey];
4883
4947
  }
4884
4948
  }
4885
- TitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: TitleStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4886
- TitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: TitleStrategy, providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) });
4887
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: TitleStrategy, decorators: [{
4949
+ TitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: TitleStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4950
+ TitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: TitleStrategy, providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) });
4951
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: TitleStrategy, decorators: [{
4888
4952
  type: Injectable,
4889
4953
  args: [{ providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) }]
4890
4954
  }] });
@@ -4908,9 +4972,9 @@ class DefaultTitleStrategy extends TitleStrategy {
4908
4972
  }
4909
4973
  }
4910
4974
  }
4911
- DefaultTitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: DefaultTitleStrategy, deps: [{ token: i1.Title }], target: i0.ɵɵFactoryTarget.Injectable });
4912
- DefaultTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: DefaultTitleStrategy, providedIn: 'root' });
4913
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: DefaultTitleStrategy, decorators: [{
4975
+ DefaultTitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: DefaultTitleStrategy, deps: [{ token: i1.Title }], target: i0.ɵɵFactoryTarget.Injectable });
4976
+ DefaultTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: DefaultTitleStrategy, providedIn: 'root' });
4977
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: DefaultTitleStrategy, decorators: [{
4914
4978
  type: Injectable,
4915
4979
  args: [{ providedIn: 'root' }]
4916
4980
  }], ctorParameters: function () { return [{ type: i1.Title }]; } });
@@ -4931,9 +4995,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1",
4931
4995
  */
4932
4996
  class RouteReuseStrategy {
4933
4997
  }
4934
- RouteReuseStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouteReuseStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4935
- RouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouteReuseStrategy, providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) });
4936
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouteReuseStrategy, decorators: [{
4998
+ RouteReuseStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: RouteReuseStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4999
+ RouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: RouteReuseStrategy, providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) });
5000
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: RouteReuseStrategy, decorators: [{
4937
5001
  type: Injectable,
4938
5002
  args: [{ providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) }]
4939
5003
  }] });
@@ -4985,9 +5049,9 @@ class BaseRouteReuseStrategy {
4985
5049
  }
4986
5050
  class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {
4987
5051
  }
4988
- DefaultRouteReuseStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: DefaultRouteReuseStrategy, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
4989
- DefaultRouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: DefaultRouteReuseStrategy, providedIn: 'root' });
4990
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: DefaultRouteReuseStrategy, decorators: [{
5052
+ DefaultRouteReuseStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: DefaultRouteReuseStrategy, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
5053
+ DefaultRouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: DefaultRouteReuseStrategy, providedIn: 'root' });
5054
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: DefaultRouteReuseStrategy, decorators: [{
4991
5055
  type: Injectable,
4992
5056
  args: [{ providedIn: 'root' }]
4993
5057
  }] });
@@ -5026,9 +5090,9 @@ const ROUTER_CONFIGURATION = new InjectionToken(NG_DEV_MODE$3 ? 'router config'
5026
5090
  */
5027
5091
  class UrlHandlingStrategy {
5028
5092
  }
5029
- UrlHandlingStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: UrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5030
- UrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: UrlHandlingStrategy, providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) });
5031
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: UrlHandlingStrategy, decorators: [{
5093
+ UrlHandlingStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: UrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5094
+ UrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: UrlHandlingStrategy, providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) });
5095
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: UrlHandlingStrategy, decorators: [{
5032
5096
  type: Injectable,
5033
5097
  args: [{ providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) }]
5034
5098
  }] });
@@ -5046,9 +5110,9 @@ class DefaultUrlHandlingStrategy {
5046
5110
  return newUrlPart;
5047
5111
  }
5048
5112
  }
5049
- DefaultUrlHandlingStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: DefaultUrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5050
- DefaultUrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: DefaultUrlHandlingStrategy, providedIn: 'root' });
5051
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: DefaultUrlHandlingStrategy, decorators: [{
5113
+ DefaultUrlHandlingStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: DefaultUrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5114
+ DefaultUrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: DefaultUrlHandlingStrategy, providedIn: 'root' });
5115
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: DefaultUrlHandlingStrategy, decorators: [{
5052
5116
  type: Injectable,
5053
5117
  args: [{ providedIn: 'root' }]
5054
5118
  }] });
@@ -5087,38 +5151,6 @@ const subsetMatchOptions = {
5087
5151
  matrixParams: 'ignored',
5088
5152
  queryParams: 'subset'
5089
5153
  };
5090
- function assignExtraOptionsToRouter(opts, router) {
5091
- if (opts.errorHandler) {
5092
- router.errorHandler = opts.errorHandler;
5093
- }
5094
- if (opts.malformedUriErrorHandler) {
5095
- router.malformedUriErrorHandler = opts.malformedUriErrorHandler;
5096
- }
5097
- if (opts.onSameUrlNavigation) {
5098
- router.onSameUrlNavigation = opts.onSameUrlNavigation;
5099
- }
5100
- if (opts.paramsInheritanceStrategy) {
5101
- router.paramsInheritanceStrategy = opts.paramsInheritanceStrategy;
5102
- }
5103
- if (opts.urlUpdateStrategy) {
5104
- router.urlUpdateStrategy = opts.urlUpdateStrategy;
5105
- }
5106
- if (opts.canceledNavigationResolution) {
5107
- router.canceledNavigationResolution = opts.canceledNavigationResolution;
5108
- }
5109
- }
5110
- function setupRouter() {
5111
- const urlSerializer = inject(UrlSerializer);
5112
- const contexts = inject(ChildrenOutletContexts);
5113
- const location = inject(Location);
5114
- const injector = inject(Injector);
5115
- const compiler = inject(Compiler);
5116
- const config = inject(ROUTES, { optional: true }) ?? [];
5117
- const opts = inject(ROUTER_CONFIGURATION, { optional: true }) ?? {};
5118
- const router = new Router(null, urlSerializer, contexts, location, injector, compiler, flatten(config));
5119
- assignExtraOptionsToRouter(opts, router);
5120
- return router;
5121
- }
5122
5154
  /**
5123
5155
  * @description
5124
5156
  *
@@ -5132,18 +5164,30 @@ function setupRouter() {
5132
5164
  * @publicApi
5133
5165
  */
5134
5166
  class Router {
5167
+ // TODO(b/260747083): This should not exist and navigationId should be private in
5168
+ // `NavigationTransitions`
5169
+ get navigationId() {
5170
+ return this.navigationTransitions.navigationId;
5171
+ }
5135
5172
  /**
5136
- * Creates the router service.
5173
+ * The ɵrouterPageId of whatever page is currently active in the browser history. This is
5174
+ * important for computing the target page id for new navigations because we need to ensure each
5175
+ * page id in the browser history is 1 more than the previous entry.
5137
5176
  */
5138
- // TODO: vsavkin make internal after the final is out.
5139
- constructor(
5140
- /** @internal */
5141
- rootComponentType, urlSerializer, rootContexts, location, injector, compiler, config) {
5142
- this.rootComponentType = rootComponentType;
5143
- this.urlSerializer = urlSerializer;
5144
- this.rootContexts = rootContexts;
5145
- this.location = location;
5146
- this.config = config;
5177
+ get browserPageId() {
5178
+ return this.location.getState()?.ɵrouterPageId;
5179
+ }
5180
+ /**
5181
+ * An event stream for routing events.
5182
+ */
5183
+ get events() {
5184
+ // TODO(atscott): This _should_ be events.asObservable(). However, this change requires internal
5185
+ // cleanup: tests are doing `(route.events as Subject<Event>).next(...)`. This isn't
5186
+ // allowed/supported but we still have to fix these or file bugs against the teams before making
5187
+ // the change.
5188
+ return this.navigationTransitions.events;
5189
+ }
5190
+ constructor() {
5147
5191
  this.disposed = false;
5148
5192
  /**
5149
5193
  * The id of the currently active page in the router.
@@ -5154,13 +5198,15 @@ class Router {
5154
5198
  * page.
5155
5199
  */
5156
5200
  this.currentPageId = 0;
5201
+ this.console = inject(ɵConsole);
5157
5202
  this.isNgZoneEnabled = false;
5203
+ this.options = inject(ROUTER_CONFIGURATION, { optional: true }) || {};
5158
5204
  /**
5159
5205
  * A handler for navigation errors in this NgModule.
5160
5206
  *
5161
5207
  * @deprecated Subscribe to the `Router` events and watch for `NavigationError` instead.
5162
5208
  */
5163
- this.errorHandler = defaultErrorHandler;
5209
+ this.errorHandler = this.options.errorHandler || defaultErrorHandler;
5164
5210
  /**
5165
5211
  * A handler for errors thrown by `Router.parseUrl(url)`
5166
5212
  * when `url` contains an invalid character.
@@ -5171,7 +5217,7 @@ class Router {
5171
5217
  * `RouterModule.forRoot(routes, {malformedUriErrorHandler: myHandler})`
5172
5218
  * @see `RouterModule`
5173
5219
  */
5174
- this.malformedUriErrorHandler = defaultMalformedUriErrorHandler;
5220
+ this.malformedUriErrorHandler = this.options.malformedUriErrorHandler || defaultMalformedUriErrorHandler;
5175
5221
  /**
5176
5222
  * True if at least one navigation event has occurred,
5177
5223
  * false otherwise.
@@ -5200,6 +5246,8 @@ class Router {
5200
5246
  * `{provide: RouteReuseStrategy, useClass: MyStrategy}`.
5201
5247
  */
5202
5248
  this.routeReuseStrategy = inject(RouteReuseStrategy);
5249
+ /** Strategy used to create a UrlTree. */
5250
+ this.urlCreationStrategy = inject(CreateUrlTreeStrategy);
5203
5251
  /**
5204
5252
  * A strategy for setting the title based on the `routerState`.
5205
5253
  *
@@ -5216,7 +5264,7 @@ class Router {
5216
5264
  * @see `provideRouter`
5217
5265
  * @see `RouterModule`
5218
5266
  */
5219
- this.onSameUrlNavigation = 'ignore';
5267
+ this.onSameUrlNavigation = this.options.onSameUrlNavigation || 'ignore';
5220
5268
  /**
5221
5269
  * How to merge parameters, data, resolved data, and title from parent to child
5222
5270
  * routes. One of:
@@ -5231,7 +5279,7 @@ class Router {
5231
5279
  * @see `provideRouter`
5232
5280
  * @see `RouterModule`
5233
5281
  */
5234
- this.paramsInheritanceStrategy = 'emptyOnly';
5282
+ this.paramsInheritanceStrategy = this.options.paramsInheritanceStrategy || 'emptyOnly';
5235
5283
  /**
5236
5284
  * Determines when the router updates the browser URL.
5237
5285
  * By default (`"deferred"`), updates the browser URL after navigation has finished.
@@ -5244,7 +5292,7 @@ class Router {
5244
5292
  * @see `provideRouter`
5245
5293
  * @see `RouterModule`
5246
5294
  */
5247
- this.urlUpdateStrategy = 'deferred';
5295
+ this.urlUpdateStrategy = this.options.urlUpdateStrategy || 'deferred';
5248
5296
  /**
5249
5297
  * Configures how the Router attempts to restore state when a navigation is cancelled.
5250
5298
  *
@@ -5271,12 +5319,15 @@ class Router {
5271
5319
  * @see `provideRouter`
5272
5320
  * @see `RouterModule`
5273
5321
  */
5274
- this.canceledNavigationResolution = 'replace';
5322
+ this.canceledNavigationResolution = this.options.canceledNavigationResolution || 'replace';
5323
+ this.config = flatten(inject(ROUTES, { optional: true }) ?? []);
5275
5324
  this.navigationTransitions = inject(NavigationTransitions);
5276
- this.console = injector.get(ɵConsole);
5277
- const ngZone = injector.get(NgZone);
5278
- this.isNgZoneEnabled = ngZone instanceof NgZone && NgZone.isInAngularZone();
5279
- this.resetConfig(config);
5325
+ this.urlSerializer = inject(UrlSerializer);
5326
+ this.location = inject(Location);
5327
+ /** @internal */
5328
+ this.rootComponentType = null;
5329
+ this.isNgZoneEnabled = inject(NgZone) instanceof NgZone && NgZone.isInAngularZone();
5330
+ this.resetConfig(this.config);
5280
5331
  this.currentUrlTree = new UrlTree();
5281
5332
  this.rawUrlTree = this.currentUrlTree;
5282
5333
  this.browserUrlTree = this.currentUrlTree;
@@ -5288,33 +5339,7 @@ class Router {
5288
5339
  this.console.warn(`Unhandled Navigation Error: ${e}`);
5289
5340
  });
5290
5341
  }
5291
- // TODO(b/260747083): This should not exist and navigationId should be private in
5292
- // `NavigationTransitions`
5293
- get navigationId() {
5294
- return this.navigationTransitions.navigationId;
5295
- }
5296
- /**
5297
- * The ɵrouterPageId of whatever page is currently active in the browser history. This is
5298
- * important for computing the target page id for new navigations because we need to ensure each
5299
- * page id in the browser history is 1 more than the previous entry.
5300
- */
5301
- get browserPageId() {
5302
- return this.location.getState()?.ɵrouterPageId;
5303
- }
5304
- /**
5305
- * An event stream for routing events.
5306
- */
5307
- get events() {
5308
- // TODO(atscott): This _should_ be events.asObservable(). However, this change requires internal
5309
- // cleanup: tests are doing `(route.events as Subject<Event>).next(...)`. This isn't
5310
- // allowed/supported but we still have to fix these or file bugs against the teams before making
5311
- // the change.
5312
- return this.navigationTransitions.events;
5313
- }
5314
- /**
5315
- * @internal
5316
- * TODO: this should be removed once the constructor of the router made internal
5317
- */
5342
+ /** @internal */
5318
5343
  resetRootComponentType(rootComponentType) {
5319
5344
  this.rootComponentType = rootComponentType;
5320
5345
  // TODO: vsavkin router 4.0 should make the root component set to null
@@ -5468,7 +5493,6 @@ class Router {
5468
5493
  */
5469
5494
  createUrlTree(commands, navigationExtras = {}) {
5470
5495
  const { relativeTo, queryParams, fragment, queryParamsHandling, preserveFragment } = navigationExtras;
5471
- const a = relativeTo || this.routerState.root;
5472
5496
  const f = preserveFragment ? this.currentUrlTree.fragment : fragment;
5473
5497
  let q = null;
5474
5498
  switch (queryParamsHandling) {
@@ -5484,7 +5508,7 @@ class Router {
5484
5508
  if (q !== null) {
5485
5509
  q = this.removeEmptyProps(q);
5486
5510
  }
5487
- return createUrlTree(a, this.currentUrlTree, commands, q, f ?? null);
5511
+ return this.urlCreationStrategy.createUrlTree(relativeTo, this.routerState, this.currentUrlTree, commands, q, f ?? null);
5488
5512
  }
5489
5513
  /**
5490
5514
  * Navigates to a view using an absolute route path.
@@ -5741,15 +5765,12 @@ class Router {
5741
5765
  return { navigationId };
5742
5766
  }
5743
5767
  }
5744
- Router.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: Router, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
5745
- Router.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: Router, providedIn: 'root', useFactory: setupRouter });
5746
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: Router, decorators: [{
5768
+ Router.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: Router, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5769
+ Router.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: Router, providedIn: 'root' });
5770
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: Router, decorators: [{
5747
5771
  type: Injectable,
5748
- args: [{
5749
- providedIn: 'root',
5750
- useFactory: setupRouter,
5751
- }]
5752
- }], ctorParameters: function () { return [{ type: i0.Type }, { type: UrlSerializer }, { type: ChildrenOutletContexts }, { type: i3.Location }, { type: i0.Injector }, { type: i0.Compiler }, { type: undefined }]; } });
5772
+ args: [{ providedIn: 'root' }]
5773
+ }], ctorParameters: function () { return []; } });
5753
5774
  function validateCommands(commands) {
5754
5775
  for (let i = 0; i < commands.length; i++) {
5755
5776
  const cmd = commands[i];
@@ -6039,9 +6060,9 @@ class RouterLink {
6039
6060
  });
6040
6061
  }
6041
6062
  }
6042
- RouterLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterLink, deps: [{ token: Router }, { token: ActivatedRoute }, { token: 'tabindex', attribute: true }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i3.LocationStrategy }], target: i0.ɵɵFactoryTarget.Directive });
6043
- RouterLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.0-next.1", type: RouterLink, isStandalone: true, selector: "[routerLink]", inputs: { target: "target", queryParams: "queryParams", fragment: "fragment", queryParamsHandling: "queryParamsHandling", state: "state", relativeTo: "relativeTo", preserveFragment: "preserveFragment", skipLocationChange: "skipLocationChange", replaceUrl: "replaceUrl", routerLink: "routerLink" }, host: { listeners: { "click": "onClick($event.button,$event.ctrlKey,$event.shiftKey,$event.altKey,$event.metaKey)" }, properties: { "attr.target": "this.target" } }, usesOnChanges: true, ngImport: i0 });
6044
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterLink, decorators: [{
6063
+ RouterLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", 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 });
6064
+ RouterLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.0-next.3", 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 });
6065
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: RouterLink, decorators: [{
6045
6066
  type: Directive,
6046
6067
  args: [{
6047
6068
  selector: '[routerLink]',
@@ -6156,6 +6177,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1",
6156
6177
  * @publicApi
6157
6178
  */
6158
6179
  class RouterLinkActive {
6180
+ get isActive() {
6181
+ return this._isActive;
6182
+ }
6159
6183
  constructor(router, element, renderer, cdr, link) {
6160
6184
  this.router = router;
6161
6185
  this.element = element;
@@ -6163,7 +6187,7 @@ class RouterLinkActive {
6163
6187
  this.cdr = cdr;
6164
6188
  this.link = link;
6165
6189
  this.classes = [];
6166
- this.isActive = false;
6190
+ this._isActive = false;
6167
6191
  /**
6168
6192
  * Options to configure how to determine if the router link is active.
6169
6193
  *
@@ -6209,7 +6233,7 @@ class RouterLinkActive {
6209
6233
  .filter((link) => !!link)
6210
6234
  .map(link => link.onChanges);
6211
6235
  this.linkInputChangesSubscription = from(allLinkChanges).pipe(mergeAll()).subscribe(link => {
6212
- if (this.isActive !== this.isLinkActive(this.router)(link)) {
6236
+ if (this._isActive !== this.isLinkActive(this.router)(link)) {
6213
6237
  this.update();
6214
6238
  }
6215
6239
  });
@@ -6232,8 +6256,8 @@ class RouterLinkActive {
6232
6256
  return;
6233
6257
  Promise.resolve().then(() => {
6234
6258
  const hasActiveLinks = this.hasActiveLinks();
6235
- if (this.isActive !== hasActiveLinks) {
6236
- this.isActive = hasActiveLinks;
6259
+ if (this._isActive !== hasActiveLinks) {
6260
+ this._isActive = hasActiveLinks;
6237
6261
  this.cdr.markForCheck();
6238
6262
  this.classes.forEach((c) => {
6239
6263
  if (hasActiveLinks) {
@@ -6266,9 +6290,9 @@ class RouterLinkActive {
6266
6290
  return this.link && isActiveCheckFn(this.link) || this.links.some(isActiveCheckFn);
6267
6291
  }
6268
6292
  }
6269
- RouterLinkActive.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterLinkActive, deps: [{ token: Router }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: RouterLink, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
6270
- RouterLinkActive.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.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 }], exportAs: ["routerLinkActive"], usesOnChanges: true, ngImport: i0 });
6271
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterLinkActive, decorators: [{
6293
+ RouterLinkActive.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: RouterLinkActive, deps: [{ token: Router }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: RouterLink, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
6294
+ RouterLinkActive.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.0-next.3", 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 });
6295
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: RouterLinkActive, decorators: [{
6272
6296
  type: Directive,
6273
6297
  args: [{
6274
6298
  selector: '[routerLinkActive]',
@@ -6328,9 +6352,9 @@ class PreloadAllModules {
6328
6352
  return fn().pipe(catchError(() => of(null)));
6329
6353
  }
6330
6354
  }
6331
- PreloadAllModules.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: PreloadAllModules, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6332
- PreloadAllModules.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: PreloadAllModules, providedIn: 'root' });
6333
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: PreloadAllModules, decorators: [{
6355
+ PreloadAllModules.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: PreloadAllModules, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6356
+ PreloadAllModules.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: PreloadAllModules, providedIn: 'root' });
6357
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: PreloadAllModules, decorators: [{
6334
6358
  type: Injectable,
6335
6359
  args: [{ providedIn: 'root' }]
6336
6360
  }] });
@@ -6348,9 +6372,9 @@ class NoPreloading {
6348
6372
  return of(null);
6349
6373
  }
6350
6374
  }
6351
- NoPreloading.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: NoPreloading, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6352
- NoPreloading.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: NoPreloading, providedIn: 'root' });
6353
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: NoPreloading, decorators: [{
6375
+ NoPreloading.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: NoPreloading, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6376
+ NoPreloading.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: NoPreloading, providedIn: 'root' });
6377
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: NoPreloading, decorators: [{
6354
6378
  type: Injectable,
6355
6379
  args: [{ providedIn: 'root' }]
6356
6380
  }] });
@@ -6444,9 +6468,9 @@ class RouterPreloader {
6444
6468
  });
6445
6469
  }
6446
6470
  }
6447
- RouterPreloader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterPreloader, deps: [{ token: Router }, { token: i0.Compiler }, { token: i0.EnvironmentInjector }, { token: PreloadingStrategy }, { token: RouterConfigLoader }], target: i0.ɵɵFactoryTarget.Injectable });
6448
- RouterPreloader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterPreloader, providedIn: 'root' });
6449
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterPreloader, decorators: [{
6471
+ RouterPreloader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: RouterPreloader, deps: [{ token: Router }, { token: i0.Compiler }, { token: i0.EnvironmentInjector }, { token: PreloadingStrategy }, { token: RouterConfigLoader }], target: i0.ɵɵFactoryTarget.Injectable });
6472
+ RouterPreloader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: RouterPreloader, providedIn: 'root' });
6473
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: RouterPreloader, decorators: [{
6450
6474
  type: Injectable,
6451
6475
  args: [{ providedIn: 'root' }]
6452
6476
  }], ctorParameters: function () { return [{ type: Router }, { type: i0.Compiler }, { type: i0.EnvironmentInjector }, { type: PreloadingStrategy }, { type: RouterConfigLoader }]; } });
@@ -6541,9 +6565,9 @@ class RouterScroller {
6541
6565
  this.scrollEventsSubscription?.unsubscribe();
6542
6566
  }
6543
6567
  }
6544
- RouterScroller.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterScroller, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
6545
- RouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterScroller });
6546
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterScroller, decorators: [{
6568
+ RouterScroller.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: RouterScroller, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
6569
+ RouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: RouterScroller });
6570
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: RouterScroller, decorators: [{
6547
6571
  type: Injectable
6548
6572
  }], ctorParameters: function () { return [{ type: UrlSerializer }, { type: NavigationTransitions }, { type: i3.ViewportScroller }, { type: i0.NgZone }, { type: undefined }]; } });
6549
6573
 
@@ -6598,10 +6622,6 @@ function provideRouter(routes, ...features) {
6598
6622
  { provide: ActivatedRoute, useFactory: rootRoute, deps: [Router] },
6599
6623
  { provide: APP_BOOTSTRAP_LISTENER, multi: true, useFactory: getBootstrapListener },
6600
6624
  features.map(feature => feature.ɵproviders),
6601
- // TODO: All options used by the `assignExtraOptionsToRouter` factory need to be reviewed for
6602
- // how we want them to be configured. This API doesn't currently have a way to configure them
6603
- // and we should decide what the _best_ way to do that is rather than just sticking with the
6604
- // status quo of how it's done today.
6605
6625
  ]);
6606
6626
  }
6607
6627
  function rootRoute(router) {
@@ -6965,6 +6985,36 @@ function withRouterConfig(options) {
6965
6985
  ];
6966
6986
  return routerFeature(5 /* RouterFeatureKind.RouterConfigurationFeature */, providers);
6967
6987
  }
6988
+ /**
6989
+ * Provides the location strategy that uses the URL fragment instead of the history API.
6990
+ *
6991
+ * @usageNotes
6992
+ *
6993
+ * Basic example of how you can use the hash location option:
6994
+ * ```
6995
+ * const appRoutes: Routes = [];
6996
+ * bootstrapApplication(AppComponent,
6997
+ * {
6998
+ * providers: [
6999
+ * provideRouter(appRoutes, withHashLocation()
7000
+ * ]
7001
+ * }
7002
+ * );
7003
+ * ```
7004
+ *
7005
+ * @see `provideRouter`
7006
+ * @see `HashLocationStrategy`
7007
+ *
7008
+ * @returns A set of providers for use with `provideRouter`.
7009
+ *
7010
+ * @publicApi
7011
+ */
7012
+ function withHashLocation() {
7013
+ const providers = [
7014
+ { provide: LocationStrategy, useClass: HashLocationStrategy },
7015
+ ];
7016
+ return routerFeature(5 /* RouterFeatureKind.RouterConfigurationFeature */, providers);
7017
+ }
6968
7018
 
6969
7019
  /**
6970
7020
  * @license
@@ -6989,7 +7039,7 @@ const ROUTER_FORROOT_GUARD = new InjectionToken(NG_DEV_MODE ? 'router duplicate
6989
7039
  const ROUTER_PROVIDERS = [
6990
7040
  Location,
6991
7041
  { provide: UrlSerializer, useClass: DefaultUrlSerializer },
6992
- { provide: Router, useFactory: setupRouter },
7042
+ Router,
6993
7043
  ChildrenOutletContexts,
6994
7044
  { provide: ActivatedRoute, useFactory: rootRoute, deps: [Router] },
6995
7045
  RouterConfigLoader,
@@ -7086,10 +7136,10 @@ class RouterModule {
7086
7136
  };
7087
7137
  }
7088
7138
  }
7089
- RouterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterModule, deps: [{ token: ROUTER_FORROOT_GUARD, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
7090
- RouterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterModule, imports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent], exports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent] });
7091
- RouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterModule, imports: [ɵEmptyOutletComponent] });
7092
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterModule, decorators: [{
7139
+ RouterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: RouterModule, deps: [{ token: ROUTER_FORROOT_GUARD, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
7140
+ RouterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0-next.3", ngImport: i0, type: RouterModule, imports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent], exports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent] });
7141
+ RouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: RouterModule, imports: [ɵEmptyOutletComponent] });
7142
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: RouterModule, decorators: [{
7093
7143
  type: NgModule,
7094
7144
  args: [{
7095
7145
  imports: ROUTER_DIRECTIVES,
@@ -7175,7 +7225,7 @@ function provideRouterInitializer() {
7175
7225
  /**
7176
7226
  * @publicApi
7177
7227
  */
7178
- const VERSION = new Version('15.1.0-next.1');
7228
+ const VERSION = new Version('15.1.0-next.3');
7179
7229
 
7180
7230
  /**
7181
7231
  * @license
@@ -7214,5 +7264,5 @@ const VERSION = new Version('15.1.0-next.1');
7214
7264
  * Generated bundle index. Do not edit.
7215
7265
  */
7216
7266
 
7217
- export { ActivatedRoute, ActivatedRouteSnapshot, ActivationEnd, ActivationStart, BaseRouteReuseStrategy, ChildActivationEnd, ChildActivationStart, ChildrenOutletContexts, DefaultTitleStrategy, DefaultUrlSerializer, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationSkipped, 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 };
7267
+ export { ActivatedRoute, ActivatedRouteSnapshot, ActivationEnd, ActivationStart, BaseRouteReuseStrategy, ChildActivationEnd, ChildActivationStart, ChildrenOutletContexts, DefaultTitleStrategy, DefaultUrlSerializer, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationSkipped, 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, withHashLocation, withInMemoryScrolling, withPreloading, withRouterConfig, ɵEmptyOutletComponent, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS, flatten as ɵflatten, withPreloading as ɵwithPreloading };
7218
7268
  //# sourceMappingURL=router.mjs.map