@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.
- package/esm2020/src/components/empty_outlet.mjs +3 -3
- package/esm2020/src/create_url_tree.mjs +2 -2
- package/esm2020/src/create_url_tree_strategy.mjs +67 -0
- package/esm2020/src/directives/router_link.mjs +3 -3
- package/esm2020/src/directives/router_link_active.mjs +11 -8
- package/esm2020/src/directives/router_outlet.mjs +3 -3
- package/esm2020/src/index.mjs +2 -2
- package/esm2020/src/navigation_transition.mjs +8 -8
- package/esm2020/src/page_title_strategy.mjs +6 -6
- package/esm2020/src/private_export.mjs +1 -2
- package/esm2020/src/provide_router.mjs +32 -6
- package/esm2020/src/route_reuse_strategy.mjs +6 -6
- package/esm2020/src/router.mjs +49 -96
- package/esm2020/src/router_config_loader.mjs +5 -5
- package/esm2020/src/router_module.mjs +7 -7
- package/esm2020/src/router_outlet_context.mjs +3 -3
- package/esm2020/src/router_preloader.mjs +9 -9
- package/esm2020/src/router_scroller.mjs +3 -3
- package/esm2020/src/router_state.mjs +7 -7
- package/esm2020/src/url_handling_strategy.mjs +6 -6
- package/esm2020/src/url_tree.mjs +4 -4
- package/esm2020/src/utils/config.mjs +2 -2
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/testing/src/router_testing_module.mjs +56 -17
- package/fesm2015/router.mjs +234 -184
- package/fesm2015/router.mjs.map +1 -1
- package/fesm2015/testing.mjs +56 -17
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2015/upgrade.mjs +1 -1
- package/fesm2020/router.mjs +231 -181
- package/fesm2020/router.mjs.map +1 -1
- package/fesm2020/testing.mjs +56 -17
- package/fesm2020/testing.mjs.map +1 -1
- package/fesm2020/upgrade.mjs +1 -1
- package/index.d.ts +49 -17
- package/package.json +4 -4
- package/testing/index.d.ts +1 -1
- package/upgrade/index.d.ts +1 -1
package/fesm2015/router.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v15.1.0-next.
|
|
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,
|
|
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$
|
|
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$
|
|
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.
|
|
465
|
-
UrlSerializer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
466
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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
|
}
|
|
@@ -1759,6 +1759,70 @@ function stringifyEvent(routerEvent) {
|
|
|
1759
1759
|
}
|
|
1760
1760
|
}
|
|
1761
1761
|
|
|
1762
|
+
/**
|
|
1763
|
+
* @license
|
|
1764
|
+
* Copyright Google LLC All Rights Reserved.
|
|
1765
|
+
*
|
|
1766
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
1767
|
+
* found in the LICENSE file at https://angular.io/license
|
|
1768
|
+
*/
|
|
1769
|
+
const NG_DEV_MODE$9 = typeof ngDevMode === 'undefined' || ngDevMode;
|
|
1770
|
+
class LegacyCreateUrlTree {
|
|
1771
|
+
createUrlTree(relativeTo, currentState, currentUrlTree, commands, queryParams, fragment) {
|
|
1772
|
+
const a = relativeTo || currentState.root;
|
|
1773
|
+
return createUrlTree(a, currentUrlTree, commands, queryParams, fragment);
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
LegacyCreateUrlTree.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: LegacyCreateUrlTree, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1777
|
+
LegacyCreateUrlTree.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: LegacyCreateUrlTree });
|
|
1778
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: LegacyCreateUrlTree, decorators: [{
|
|
1779
|
+
type: Injectable
|
|
1780
|
+
}] });
|
|
1781
|
+
class CreateUrlTreeUsingSnapshot {
|
|
1782
|
+
createUrlTree(relativeTo, currentState, currentUrlTree, commands, queryParams, fragment) {
|
|
1783
|
+
let relativeToUrlSegmentGroup;
|
|
1784
|
+
try {
|
|
1785
|
+
const relativeToSnapshot = relativeTo ? relativeTo.snapshot : currentState.snapshot.root;
|
|
1786
|
+
relativeToUrlSegmentGroup = createSegmentGroupFromRoute(relativeToSnapshot);
|
|
1787
|
+
}
|
|
1788
|
+
catch (e) {
|
|
1789
|
+
// This is strictly for backwards compatibility with tests that create
|
|
1790
|
+
// invalid `ActivatedRoute` mocks.
|
|
1791
|
+
// Note: the difference between having this fallback for invalid `ActivatedRoute` setups and
|
|
1792
|
+
// just throwing is ~500 test failures. Fixing all of those tests by hand is not feasible at
|
|
1793
|
+
// the moment.
|
|
1794
|
+
if (NG_DEV_MODE$9) {
|
|
1795
|
+
console.warn(`The ActivatedRoute has an invalid structure. This is likely due to an incomplete mock in tests.`);
|
|
1796
|
+
}
|
|
1797
|
+
if (typeof commands[0] !== 'string' || !commands[0].startsWith('/')) {
|
|
1798
|
+
// Navigations that were absolute in the old way of creating UrlTrees
|
|
1799
|
+
// would still work because they wouldn't attempt to match the
|
|
1800
|
+
// segments in the `ActivatedRoute` to the `currentUrlTree` but
|
|
1801
|
+
// instead just replace the root segment with the navigation result.
|
|
1802
|
+
// Non-absolute navigations would fail to apply the commands because
|
|
1803
|
+
// the logic could not find the segment to replace (so they'd act like there were no
|
|
1804
|
+
// commands).
|
|
1805
|
+
commands = [];
|
|
1806
|
+
}
|
|
1807
|
+
relativeToUrlSegmentGroup = currentUrlTree.root;
|
|
1808
|
+
}
|
|
1809
|
+
return createUrlTreeFromSegmentGroup(relativeToUrlSegmentGroup, commands, queryParams, fragment);
|
|
1810
|
+
}
|
|
1811
|
+
}
|
|
1812
|
+
CreateUrlTreeUsingSnapshot.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: CreateUrlTreeUsingSnapshot, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1813
|
+
CreateUrlTreeUsingSnapshot.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: CreateUrlTreeUsingSnapshot });
|
|
1814
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: CreateUrlTreeUsingSnapshot, decorators: [{
|
|
1815
|
+
type: Injectable
|
|
1816
|
+
}] });
|
|
1817
|
+
class CreateUrlTreeStrategy {
|
|
1818
|
+
}
|
|
1819
|
+
CreateUrlTreeStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: CreateUrlTreeStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1820
|
+
CreateUrlTreeStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: CreateUrlTreeStrategy, providedIn: 'root', useClass: LegacyCreateUrlTree });
|
|
1821
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: CreateUrlTreeStrategy, decorators: [{
|
|
1822
|
+
type: Injectable,
|
|
1823
|
+
args: [{ providedIn: 'root', useClass: LegacyCreateUrlTree }]
|
|
1824
|
+
}] });
|
|
1825
|
+
|
|
1762
1826
|
/**
|
|
1763
1827
|
* @license
|
|
1764
1828
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -2083,6 +2147,13 @@ function flattenInherited(pathFromRoot) {
|
|
|
2083
2147
|
* @publicApi
|
|
2084
2148
|
*/
|
|
2085
2149
|
class ActivatedRouteSnapshot {
|
|
2150
|
+
/** The resolved route title */
|
|
2151
|
+
get title() {
|
|
2152
|
+
var _a;
|
|
2153
|
+
// Note: This _must_ be a getter because the data is mutated in the resolvers. Title will not be
|
|
2154
|
+
// available at the time of class instantiation.
|
|
2155
|
+
return (_a = this.data) === null || _a === void 0 ? void 0 : _a[RouteTitleKey];
|
|
2156
|
+
}
|
|
2086
2157
|
/** @internal */
|
|
2087
2158
|
constructor(
|
|
2088
2159
|
/** The URL segments matched by this route */
|
|
@@ -2129,13 +2200,6 @@ class ActivatedRouteSnapshot {
|
|
|
2129
2200
|
this._lastPathIndex = lastPathIndex;
|
|
2130
2201
|
this._resolve = resolve;
|
|
2131
2202
|
}
|
|
2132
|
-
/** The resolved route title */
|
|
2133
|
-
get title() {
|
|
2134
|
-
var _a;
|
|
2135
|
-
// Note: This _must_ be a getter because the data is mutated in the resolvers. Title will not be
|
|
2136
|
-
// available at the time of class instantiation.
|
|
2137
|
-
return (_a = this.data) === null || _a === void 0 ? void 0 : _a[RouteTitleKey];
|
|
2138
|
-
}
|
|
2139
2203
|
/** The root of the router state */
|
|
2140
2204
|
get root() {
|
|
2141
2205
|
return this._routerState.root;
|
|
@@ -2419,9 +2483,9 @@ class ChildrenOutletContexts {
|
|
|
2419
2483
|
return this.contexts.get(childName) || null;
|
|
2420
2484
|
}
|
|
2421
2485
|
}
|
|
2422
|
-
ChildrenOutletContexts.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
2423
|
-
ChildrenOutletContexts.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
2424
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
2486
|
+
ChildrenOutletContexts.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: ChildrenOutletContexts, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2487
|
+
ChildrenOutletContexts.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: ChildrenOutletContexts, providedIn: 'root' });
|
|
2488
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: ChildrenOutletContexts, decorators: [{
|
|
2425
2489
|
type: Injectable,
|
|
2426
2490
|
args: [{ providedIn: 'root' }]
|
|
2427
2491
|
}] });
|
|
@@ -2642,9 +2706,9 @@ class RouterOutlet {
|
|
|
2642
2706
|
this.activateEvents.emit(this.activated.instance);
|
|
2643
2707
|
}
|
|
2644
2708
|
}
|
|
2645
|
-
RouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
2646
|
-
RouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.0-next.
|
|
2647
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
2709
|
+
RouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: RouterOutlet, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2710
|
+
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 });
|
|
2711
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: RouterOutlet, decorators: [{
|
|
2648
2712
|
type: Directive,
|
|
2649
2713
|
args: [{
|
|
2650
2714
|
selector: 'router-outlet',
|
|
@@ -2704,9 +2768,9 @@ function isComponentFactoryResolver(item) {
|
|
|
2704
2768
|
*/
|
|
2705
2769
|
class ɵEmptyOutletComponent {
|
|
2706
2770
|
}
|
|
2707
|
-
ɵEmptyOutletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
2708
|
-
ɵEmptyOutletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.0-next.
|
|
2709
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
2771
|
+
ɵEmptyOutletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: ɵEmptyOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2772
|
+
ɵ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"] }] });
|
|
2773
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: ɵEmptyOutletComponent, decorators: [{
|
|
2710
2774
|
type: Component,
|
|
2711
2775
|
args: [{
|
|
2712
2776
|
template: `<router-outlet></router-outlet>`,
|
|
@@ -2759,7 +2823,7 @@ function validateConfig(config, parentPath = '', requireStandaloneComponents = f
|
|
|
2759
2823
|
}
|
|
2760
2824
|
}
|
|
2761
2825
|
function assertStandalone(fullPath, component) {
|
|
2762
|
-
if (component &&
|
|
2826
|
+
if (component && !isStandalone(component)) {
|
|
2763
2827
|
throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}'. The component must be standalone.`);
|
|
2764
2828
|
}
|
|
2765
2829
|
}
|
|
@@ -4367,7 +4431,7 @@ const NG_DEV_MODE$5 = typeof ngDevMode === 'undefined' || !!ngDevMode;
|
|
|
4367
4431
|
* `ROUTES` is a low level API for router configuration via dependency injection.
|
|
4368
4432
|
*
|
|
4369
4433
|
* We recommend that in almost all cases to use higher level APIs such as `RouterModule.forRoot()`,
|
|
4370
|
-
* `
|
|
4434
|
+
* `provideRouter`, or `Router.resetConfig()`.
|
|
4371
4435
|
*
|
|
4372
4436
|
* @publicApi
|
|
4373
4437
|
*/
|
|
@@ -4465,9 +4529,9 @@ class RouterConfigLoader {
|
|
|
4465
4529
|
}));
|
|
4466
4530
|
}
|
|
4467
4531
|
}
|
|
4468
|
-
RouterConfigLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
4469
|
-
RouterConfigLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
4470
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
4532
|
+
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 });
|
|
4533
|
+
RouterConfigLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: RouterConfigLoader, providedIn: 'root' });
|
|
4534
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: RouterConfigLoader, decorators: [{
|
|
4471
4535
|
type: Injectable,
|
|
4472
4536
|
args: [{ providedIn: 'root' }]
|
|
4473
4537
|
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.Compiler }]; } });
|
|
@@ -4492,6 +4556,9 @@ function maybeUnwrapDefaultExport(input) {
|
|
|
4492
4556
|
*/
|
|
4493
4557
|
const NG_DEV_MODE$4 = typeof ngDevMode === 'undefined' || !!ngDevMode;
|
|
4494
4558
|
class NavigationTransitions {
|
|
4559
|
+
get hasRequestedNavigation() {
|
|
4560
|
+
return this.navigationId !== 0;
|
|
4561
|
+
}
|
|
4495
4562
|
constructor() {
|
|
4496
4563
|
this.currentNavigation = null;
|
|
4497
4564
|
this.lastSuccessfulNavigation = null;
|
|
@@ -4506,9 +4573,6 @@ class NavigationTransitions {
|
|
|
4506
4573
|
this.configLoader.onLoadEndListener = onLoadEnd;
|
|
4507
4574
|
this.configLoader.onLoadStartListener = onLoadStart;
|
|
4508
4575
|
}
|
|
4509
|
-
get hasRequestedNavigation() {
|
|
4510
|
-
return this.navigationId !== 0;
|
|
4511
|
-
}
|
|
4512
4576
|
complete() {
|
|
4513
4577
|
var _a;
|
|
4514
4578
|
(_a = this.transitions) === null || _a === void 0 ? void 0 : _a.complete();
|
|
@@ -4829,7 +4893,7 @@ class NavigationTransitions {
|
|
|
4829
4893
|
}
|
|
4830
4894
|
return EMPTY;
|
|
4831
4895
|
}));
|
|
4832
|
-
//
|
|
4896
|
+
// casting because `pipe` returns observable({}) when called with 8+ arguments
|
|
4833
4897
|
}));
|
|
4834
4898
|
}
|
|
4835
4899
|
cancelNavigationTransition(t, reason, code, router) {
|
|
@@ -4838,9 +4902,9 @@ class NavigationTransitions {
|
|
|
4838
4902
|
t.resolve(false);
|
|
4839
4903
|
}
|
|
4840
4904
|
}
|
|
4841
|
-
NavigationTransitions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
4842
|
-
NavigationTransitions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
4843
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
4905
|
+
NavigationTransitions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: NavigationTransitions, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4906
|
+
NavigationTransitions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: NavigationTransitions, providedIn: 'root' });
|
|
4907
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: NavigationTransitions, decorators: [{
|
|
4844
4908
|
type: Injectable,
|
|
4845
4909
|
args: [{ providedIn: 'root' }]
|
|
4846
4910
|
}], ctorParameters: function () { return []; } });
|
|
@@ -4900,9 +4964,9 @@ class TitleStrategy {
|
|
|
4900
4964
|
return snapshot.data[RouteTitleKey];
|
|
4901
4965
|
}
|
|
4902
4966
|
}
|
|
4903
|
-
TitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
4904
|
-
TitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
4905
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
4967
|
+
TitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: TitleStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4968
|
+
TitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: TitleStrategy, providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) });
|
|
4969
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: TitleStrategy, decorators: [{
|
|
4906
4970
|
type: Injectable,
|
|
4907
4971
|
args: [{ providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) }]
|
|
4908
4972
|
}] });
|
|
@@ -4926,9 +4990,9 @@ class DefaultTitleStrategy extends TitleStrategy {
|
|
|
4926
4990
|
}
|
|
4927
4991
|
}
|
|
4928
4992
|
}
|
|
4929
|
-
DefaultTitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
4930
|
-
DefaultTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
4931
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
4993
|
+
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 });
|
|
4994
|
+
DefaultTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: DefaultTitleStrategy, providedIn: 'root' });
|
|
4995
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: DefaultTitleStrategy, decorators: [{
|
|
4932
4996
|
type: Injectable,
|
|
4933
4997
|
args: [{ providedIn: 'root' }]
|
|
4934
4998
|
}], ctorParameters: function () { return [{ type: i1.Title }]; } });
|
|
@@ -4949,9 +5013,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1",
|
|
|
4949
5013
|
*/
|
|
4950
5014
|
class RouteReuseStrategy {
|
|
4951
5015
|
}
|
|
4952
|
-
RouteReuseStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
4953
|
-
RouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
4954
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
5016
|
+
RouteReuseStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: RouteReuseStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5017
|
+
RouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: RouteReuseStrategy, providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) });
|
|
5018
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: RouteReuseStrategy, decorators: [{
|
|
4955
5019
|
type: Injectable,
|
|
4956
5020
|
args: [{ providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) }]
|
|
4957
5021
|
}] });
|
|
@@ -5003,9 +5067,9 @@ class BaseRouteReuseStrategy {
|
|
|
5003
5067
|
}
|
|
5004
5068
|
class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {
|
|
5005
5069
|
}
|
|
5006
|
-
DefaultRouteReuseStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
5007
|
-
DefaultRouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
5008
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
5070
|
+
DefaultRouteReuseStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: DefaultRouteReuseStrategy, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
5071
|
+
DefaultRouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: DefaultRouteReuseStrategy, providedIn: 'root' });
|
|
5072
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: DefaultRouteReuseStrategy, decorators: [{
|
|
5009
5073
|
type: Injectable,
|
|
5010
5074
|
args: [{ providedIn: 'root' }]
|
|
5011
5075
|
}] });
|
|
@@ -5044,9 +5108,9 @@ const ROUTER_CONFIGURATION = new InjectionToken(NG_DEV_MODE$3 ? 'router config'
|
|
|
5044
5108
|
*/
|
|
5045
5109
|
class UrlHandlingStrategy {
|
|
5046
5110
|
}
|
|
5047
|
-
UrlHandlingStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
5048
|
-
UrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
5049
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
5111
|
+
UrlHandlingStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: UrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5112
|
+
UrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: UrlHandlingStrategy, providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) });
|
|
5113
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: UrlHandlingStrategy, decorators: [{
|
|
5050
5114
|
type: Injectable,
|
|
5051
5115
|
args: [{ providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) }]
|
|
5052
5116
|
}] });
|
|
@@ -5064,9 +5128,9 @@ class DefaultUrlHandlingStrategy {
|
|
|
5064
5128
|
return newUrlPart;
|
|
5065
5129
|
}
|
|
5066
5130
|
}
|
|
5067
|
-
DefaultUrlHandlingStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
5068
|
-
DefaultUrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
5069
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
5131
|
+
DefaultUrlHandlingStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: DefaultUrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5132
|
+
DefaultUrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: DefaultUrlHandlingStrategy, providedIn: 'root' });
|
|
5133
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: DefaultUrlHandlingStrategy, decorators: [{
|
|
5070
5134
|
type: Injectable,
|
|
5071
5135
|
args: [{ providedIn: 'root' }]
|
|
5072
5136
|
}] });
|
|
@@ -5105,39 +5169,6 @@ const subsetMatchOptions = {
|
|
|
5105
5169
|
matrixParams: 'ignored',
|
|
5106
5170
|
queryParams: 'subset'
|
|
5107
5171
|
};
|
|
5108
|
-
function assignExtraOptionsToRouter(opts, router) {
|
|
5109
|
-
if (opts.errorHandler) {
|
|
5110
|
-
router.errorHandler = opts.errorHandler;
|
|
5111
|
-
}
|
|
5112
|
-
if (opts.malformedUriErrorHandler) {
|
|
5113
|
-
router.malformedUriErrorHandler = opts.malformedUriErrorHandler;
|
|
5114
|
-
}
|
|
5115
|
-
if (opts.onSameUrlNavigation) {
|
|
5116
|
-
router.onSameUrlNavigation = opts.onSameUrlNavigation;
|
|
5117
|
-
}
|
|
5118
|
-
if (opts.paramsInheritanceStrategy) {
|
|
5119
|
-
router.paramsInheritanceStrategy = opts.paramsInheritanceStrategy;
|
|
5120
|
-
}
|
|
5121
|
-
if (opts.urlUpdateStrategy) {
|
|
5122
|
-
router.urlUpdateStrategy = opts.urlUpdateStrategy;
|
|
5123
|
-
}
|
|
5124
|
-
if (opts.canceledNavigationResolution) {
|
|
5125
|
-
router.canceledNavigationResolution = opts.canceledNavigationResolution;
|
|
5126
|
-
}
|
|
5127
|
-
}
|
|
5128
|
-
function setupRouter() {
|
|
5129
|
-
var _a, _b;
|
|
5130
|
-
const urlSerializer = inject(UrlSerializer);
|
|
5131
|
-
const contexts = inject(ChildrenOutletContexts);
|
|
5132
|
-
const location = inject(Location);
|
|
5133
|
-
const injector = inject(Injector);
|
|
5134
|
-
const compiler = inject(Compiler);
|
|
5135
|
-
const config = (_a = inject(ROUTES, { optional: true })) !== null && _a !== void 0 ? _a : [];
|
|
5136
|
-
const opts = (_b = inject(ROUTER_CONFIGURATION, { optional: true })) !== null && _b !== void 0 ? _b : {};
|
|
5137
|
-
const router = new Router(null, urlSerializer, contexts, location, injector, compiler, flatten(config));
|
|
5138
|
-
assignExtraOptionsToRouter(opts, router);
|
|
5139
|
-
return router;
|
|
5140
|
-
}
|
|
5141
5172
|
/**
|
|
5142
5173
|
* @description
|
|
5143
5174
|
*
|
|
@@ -5151,18 +5182,32 @@ function setupRouter() {
|
|
|
5151
5182
|
* @publicApi
|
|
5152
5183
|
*/
|
|
5153
5184
|
class Router {
|
|
5185
|
+
// TODO(b/260747083): This should not exist and navigationId should be private in
|
|
5186
|
+
// `NavigationTransitions`
|
|
5187
|
+
get navigationId() {
|
|
5188
|
+
return this.navigationTransitions.navigationId;
|
|
5189
|
+
}
|
|
5154
5190
|
/**
|
|
5155
|
-
*
|
|
5191
|
+
* The ɵrouterPageId of whatever page is currently active in the browser history. This is
|
|
5192
|
+
* important for computing the target page id for new navigations because we need to ensure each
|
|
5193
|
+
* page id in the browser history is 1 more than the previous entry.
|
|
5156
5194
|
*/
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5195
|
+
get browserPageId() {
|
|
5196
|
+
var _a;
|
|
5197
|
+
return (_a = this.location.getState()) === null || _a === void 0 ? void 0 : _a.ɵrouterPageId;
|
|
5198
|
+
}
|
|
5199
|
+
/**
|
|
5200
|
+
* An event stream for routing events.
|
|
5201
|
+
*/
|
|
5202
|
+
get events() {
|
|
5203
|
+
// TODO(atscott): This _should_ be events.asObservable(). However, this change requires internal
|
|
5204
|
+
// cleanup: tests are doing `(route.events as Subject<Event>).next(...)`. This isn't
|
|
5205
|
+
// allowed/supported but we still have to fix these or file bugs against the teams before making
|
|
5206
|
+
// the change.
|
|
5207
|
+
return this.navigationTransitions.events;
|
|
5208
|
+
}
|
|
5209
|
+
constructor() {
|
|
5210
|
+
var _a;
|
|
5166
5211
|
this.disposed = false;
|
|
5167
5212
|
/**
|
|
5168
5213
|
* The id of the currently active page in the router.
|
|
@@ -5173,13 +5218,15 @@ class Router {
|
|
|
5173
5218
|
* page.
|
|
5174
5219
|
*/
|
|
5175
5220
|
this.currentPageId = 0;
|
|
5221
|
+
this.console = inject(ɵConsole);
|
|
5176
5222
|
this.isNgZoneEnabled = false;
|
|
5223
|
+
this.options = inject(ROUTER_CONFIGURATION, { optional: true }) || {};
|
|
5177
5224
|
/**
|
|
5178
5225
|
* A handler for navigation errors in this NgModule.
|
|
5179
5226
|
*
|
|
5180
5227
|
* @deprecated Subscribe to the `Router` events and watch for `NavigationError` instead.
|
|
5181
5228
|
*/
|
|
5182
|
-
this.errorHandler = defaultErrorHandler;
|
|
5229
|
+
this.errorHandler = this.options.errorHandler || defaultErrorHandler;
|
|
5183
5230
|
/**
|
|
5184
5231
|
* A handler for errors thrown by `Router.parseUrl(url)`
|
|
5185
5232
|
* when `url` contains an invalid character.
|
|
@@ -5190,7 +5237,7 @@ class Router {
|
|
|
5190
5237
|
* `RouterModule.forRoot(routes, {malformedUriErrorHandler: myHandler})`
|
|
5191
5238
|
* @see `RouterModule`
|
|
5192
5239
|
*/
|
|
5193
|
-
this.malformedUriErrorHandler = defaultMalformedUriErrorHandler;
|
|
5240
|
+
this.malformedUriErrorHandler = this.options.malformedUriErrorHandler || defaultMalformedUriErrorHandler;
|
|
5194
5241
|
/**
|
|
5195
5242
|
* True if at least one navigation event has occurred,
|
|
5196
5243
|
* false otherwise.
|
|
@@ -5219,6 +5266,8 @@ class Router {
|
|
|
5219
5266
|
* `{provide: RouteReuseStrategy, useClass: MyStrategy}`.
|
|
5220
5267
|
*/
|
|
5221
5268
|
this.routeReuseStrategy = inject(RouteReuseStrategy);
|
|
5269
|
+
/** Strategy used to create a UrlTree. */
|
|
5270
|
+
this.urlCreationStrategy = inject(CreateUrlTreeStrategy);
|
|
5222
5271
|
/**
|
|
5223
5272
|
* A strategy for setting the title based on the `routerState`.
|
|
5224
5273
|
*
|
|
@@ -5235,7 +5284,7 @@ class Router {
|
|
|
5235
5284
|
* @see `provideRouter`
|
|
5236
5285
|
* @see `RouterModule`
|
|
5237
5286
|
*/
|
|
5238
|
-
this.onSameUrlNavigation = 'ignore';
|
|
5287
|
+
this.onSameUrlNavigation = this.options.onSameUrlNavigation || 'ignore';
|
|
5239
5288
|
/**
|
|
5240
5289
|
* How to merge parameters, data, resolved data, and title from parent to child
|
|
5241
5290
|
* routes. One of:
|
|
@@ -5250,7 +5299,7 @@ class Router {
|
|
|
5250
5299
|
* @see `provideRouter`
|
|
5251
5300
|
* @see `RouterModule`
|
|
5252
5301
|
*/
|
|
5253
|
-
this.paramsInheritanceStrategy = 'emptyOnly';
|
|
5302
|
+
this.paramsInheritanceStrategy = this.options.paramsInheritanceStrategy || 'emptyOnly';
|
|
5254
5303
|
/**
|
|
5255
5304
|
* Determines when the router updates the browser URL.
|
|
5256
5305
|
* By default (`"deferred"`), updates the browser URL after navigation has finished.
|
|
@@ -5263,7 +5312,7 @@ class Router {
|
|
|
5263
5312
|
* @see `provideRouter`
|
|
5264
5313
|
* @see `RouterModule`
|
|
5265
5314
|
*/
|
|
5266
|
-
this.urlUpdateStrategy = 'deferred';
|
|
5315
|
+
this.urlUpdateStrategy = this.options.urlUpdateStrategy || 'deferred';
|
|
5267
5316
|
/**
|
|
5268
5317
|
* Configures how the Router attempts to restore state when a navigation is cancelled.
|
|
5269
5318
|
*
|
|
@@ -5290,12 +5339,15 @@ class Router {
|
|
|
5290
5339
|
* @see `provideRouter`
|
|
5291
5340
|
* @see `RouterModule`
|
|
5292
5341
|
*/
|
|
5293
|
-
this.canceledNavigationResolution = 'replace';
|
|
5342
|
+
this.canceledNavigationResolution = this.options.canceledNavigationResolution || 'replace';
|
|
5343
|
+
this.config = flatten((_a = inject(ROUTES, { optional: true })) !== null && _a !== void 0 ? _a : []);
|
|
5294
5344
|
this.navigationTransitions = inject(NavigationTransitions);
|
|
5295
|
-
this.
|
|
5296
|
-
|
|
5297
|
-
|
|
5298
|
-
this.
|
|
5345
|
+
this.urlSerializer = inject(UrlSerializer);
|
|
5346
|
+
this.location = inject(Location);
|
|
5347
|
+
/** @internal */
|
|
5348
|
+
this.rootComponentType = null;
|
|
5349
|
+
this.isNgZoneEnabled = inject(NgZone) instanceof NgZone && NgZone.isInAngularZone();
|
|
5350
|
+
this.resetConfig(this.config);
|
|
5299
5351
|
this.currentUrlTree = new UrlTree();
|
|
5300
5352
|
this.rawUrlTree = this.currentUrlTree;
|
|
5301
5353
|
this.browserUrlTree = this.currentUrlTree;
|
|
@@ -5307,34 +5359,7 @@ class Router {
|
|
|
5307
5359
|
this.console.warn(`Unhandled Navigation Error: ${e}`);
|
|
5308
5360
|
});
|
|
5309
5361
|
}
|
|
5310
|
-
|
|
5311
|
-
// `NavigationTransitions`
|
|
5312
|
-
get navigationId() {
|
|
5313
|
-
return this.navigationTransitions.navigationId;
|
|
5314
|
-
}
|
|
5315
|
-
/**
|
|
5316
|
-
* The ɵrouterPageId of whatever page is currently active in the browser history. This is
|
|
5317
|
-
* important for computing the target page id for new navigations because we need to ensure each
|
|
5318
|
-
* page id in the browser history is 1 more than the previous entry.
|
|
5319
|
-
*/
|
|
5320
|
-
get browserPageId() {
|
|
5321
|
-
var _a;
|
|
5322
|
-
return (_a = this.location.getState()) === null || _a === void 0 ? void 0 : _a.ɵrouterPageId;
|
|
5323
|
-
}
|
|
5324
|
-
/**
|
|
5325
|
-
* An event stream for routing events.
|
|
5326
|
-
*/
|
|
5327
|
-
get events() {
|
|
5328
|
-
// TODO(atscott): This _should_ be events.asObservable(). However, this change requires internal
|
|
5329
|
-
// cleanup: tests are doing `(route.events as Subject<Event>).next(...)`. This isn't
|
|
5330
|
-
// allowed/supported but we still have to fix these or file bugs against the teams before making
|
|
5331
|
-
// the change.
|
|
5332
|
-
return this.navigationTransitions.events;
|
|
5333
|
-
}
|
|
5334
|
-
/**
|
|
5335
|
-
* @internal
|
|
5336
|
-
* TODO: this should be removed once the constructor of the router made internal
|
|
5337
|
-
*/
|
|
5362
|
+
/** @internal */
|
|
5338
5363
|
resetRootComponentType(rootComponentType) {
|
|
5339
5364
|
this.rootComponentType = rootComponentType;
|
|
5340
5365
|
// TODO: vsavkin router 4.0 should make the root component set to null
|
|
@@ -5489,7 +5514,6 @@ class Router {
|
|
|
5489
5514
|
*/
|
|
5490
5515
|
createUrlTree(commands, navigationExtras = {}) {
|
|
5491
5516
|
const { relativeTo, queryParams, fragment, queryParamsHandling, preserveFragment } = navigationExtras;
|
|
5492
|
-
const a = relativeTo || this.routerState.root;
|
|
5493
5517
|
const f = preserveFragment ? this.currentUrlTree.fragment : fragment;
|
|
5494
5518
|
let q = null;
|
|
5495
5519
|
switch (queryParamsHandling) {
|
|
@@ -5505,7 +5529,7 @@ class Router {
|
|
|
5505
5529
|
if (q !== null) {
|
|
5506
5530
|
q = this.removeEmptyProps(q);
|
|
5507
5531
|
}
|
|
5508
|
-
return createUrlTree(
|
|
5532
|
+
return this.urlCreationStrategy.createUrlTree(relativeTo, this.routerState, this.currentUrlTree, commands, q, f !== null && f !== void 0 ? f : null);
|
|
5509
5533
|
}
|
|
5510
5534
|
/**
|
|
5511
5535
|
* Navigates to a view using an absolute route path.
|
|
@@ -5761,15 +5785,12 @@ class Router {
|
|
|
5761
5785
|
return { navigationId };
|
|
5762
5786
|
}
|
|
5763
5787
|
}
|
|
5764
|
-
Router.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
5765
|
-
Router.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
5766
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
5788
|
+
Router.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: Router, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5789
|
+
Router.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: Router, providedIn: 'root' });
|
|
5790
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: Router, decorators: [{
|
|
5767
5791
|
type: Injectable,
|
|
5768
|
-
args: [{
|
|
5769
|
-
|
|
5770
|
-
useFactory: setupRouter,
|
|
5771
|
-
}]
|
|
5772
|
-
}], ctorParameters: function () { return [{ type: i0.Type }, { type: UrlSerializer }, { type: ChildrenOutletContexts }, { type: i3.Location }, { type: i0.Injector }, { type: i0.Compiler }, { type: undefined }]; } });
|
|
5792
|
+
args: [{ providedIn: 'root' }]
|
|
5793
|
+
}], ctorParameters: function () { return []; } });
|
|
5773
5794
|
function validateCommands(commands) {
|
|
5774
5795
|
for (let i = 0; i < commands.length; i++) {
|
|
5775
5796
|
const cmd = commands[i];
|
|
@@ -6054,9 +6075,9 @@ class RouterLink {
|
|
|
6054
6075
|
});
|
|
6055
6076
|
}
|
|
6056
6077
|
}
|
|
6057
|
-
RouterLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
6058
|
-
RouterLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.0-next.
|
|
6059
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
6078
|
+
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 });
|
|
6079
|
+
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 });
|
|
6080
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: RouterLink, decorators: [{
|
|
6060
6081
|
type: Directive,
|
|
6061
6082
|
args: [{
|
|
6062
6083
|
selector: '[routerLink]',
|
|
@@ -6173,6 +6194,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1",
|
|
|
6173
6194
|
* @publicApi
|
|
6174
6195
|
*/
|
|
6175
6196
|
class RouterLinkActive {
|
|
6197
|
+
get isActive() {
|
|
6198
|
+
return this._isActive;
|
|
6199
|
+
}
|
|
6176
6200
|
constructor(router, element, renderer, cdr, link) {
|
|
6177
6201
|
this.router = router;
|
|
6178
6202
|
this.element = element;
|
|
@@ -6180,7 +6204,7 @@ class RouterLinkActive {
|
|
|
6180
6204
|
this.cdr = cdr;
|
|
6181
6205
|
this.link = link;
|
|
6182
6206
|
this.classes = [];
|
|
6183
|
-
this.
|
|
6207
|
+
this._isActive = false;
|
|
6184
6208
|
/**
|
|
6185
6209
|
* Options to configure how to determine if the router link is active.
|
|
6186
6210
|
*
|
|
@@ -6227,7 +6251,7 @@ class RouterLinkActive {
|
|
|
6227
6251
|
.filter((link) => !!link)
|
|
6228
6252
|
.map(link => link.onChanges);
|
|
6229
6253
|
this.linkInputChangesSubscription = from(allLinkChanges).pipe(mergeAll()).subscribe(link => {
|
|
6230
|
-
if (this.
|
|
6254
|
+
if (this._isActive !== this.isLinkActive(this.router)(link)) {
|
|
6231
6255
|
this.update();
|
|
6232
6256
|
}
|
|
6233
6257
|
});
|
|
@@ -6251,8 +6275,8 @@ class RouterLinkActive {
|
|
|
6251
6275
|
return;
|
|
6252
6276
|
Promise.resolve().then(() => {
|
|
6253
6277
|
const hasActiveLinks = this.hasActiveLinks();
|
|
6254
|
-
if (this.
|
|
6255
|
-
this.
|
|
6278
|
+
if (this._isActive !== hasActiveLinks) {
|
|
6279
|
+
this._isActive = hasActiveLinks;
|
|
6256
6280
|
this.cdr.markForCheck();
|
|
6257
6281
|
this.classes.forEach((c) => {
|
|
6258
6282
|
if (hasActiveLinks) {
|
|
@@ -6285,9 +6309,9 @@ class RouterLinkActive {
|
|
|
6285
6309
|
return this.link && isActiveCheckFn(this.link) || this.links.some(isActiveCheckFn);
|
|
6286
6310
|
}
|
|
6287
6311
|
}
|
|
6288
|
-
RouterLinkActive.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
6289
|
-
RouterLinkActive.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.0-next.
|
|
6290
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
6312
|
+
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 });
|
|
6313
|
+
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 });
|
|
6314
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: RouterLinkActive, decorators: [{
|
|
6291
6315
|
type: Directive,
|
|
6292
6316
|
args: [{
|
|
6293
6317
|
selector: '[routerLinkActive]',
|
|
@@ -6349,9 +6373,9 @@ class PreloadAllModules {
|
|
|
6349
6373
|
return fn().pipe(catchError(() => of(null)));
|
|
6350
6374
|
}
|
|
6351
6375
|
}
|
|
6352
|
-
PreloadAllModules.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
6353
|
-
PreloadAllModules.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
6354
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
6376
|
+
PreloadAllModules.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: PreloadAllModules, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6377
|
+
PreloadAllModules.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: PreloadAllModules, providedIn: 'root' });
|
|
6378
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: PreloadAllModules, decorators: [{
|
|
6355
6379
|
type: Injectable,
|
|
6356
6380
|
args: [{ providedIn: 'root' }]
|
|
6357
6381
|
}] });
|
|
@@ -6369,9 +6393,9 @@ class NoPreloading {
|
|
|
6369
6393
|
return of(null);
|
|
6370
6394
|
}
|
|
6371
6395
|
}
|
|
6372
|
-
NoPreloading.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
6373
|
-
NoPreloading.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
6374
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
6396
|
+
NoPreloading.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: NoPreloading, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6397
|
+
NoPreloading.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: NoPreloading, providedIn: 'root' });
|
|
6398
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: NoPreloading, decorators: [{
|
|
6375
6399
|
type: Injectable,
|
|
6376
6400
|
args: [{ providedIn: 'root' }]
|
|
6377
6401
|
}] });
|
|
@@ -6467,9 +6491,9 @@ class RouterPreloader {
|
|
|
6467
6491
|
});
|
|
6468
6492
|
}
|
|
6469
6493
|
}
|
|
6470
|
-
RouterPreloader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
6471
|
-
RouterPreloader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
6472
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
6494
|
+
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 });
|
|
6495
|
+
RouterPreloader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: RouterPreloader, providedIn: 'root' });
|
|
6496
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: RouterPreloader, decorators: [{
|
|
6473
6497
|
type: Injectable,
|
|
6474
6498
|
args: [{ providedIn: 'root' }]
|
|
6475
6499
|
}], ctorParameters: function () { return [{ type: Router }, { type: i0.Compiler }, { type: i0.EnvironmentInjector }, { type: PreloadingStrategy }, { type: RouterConfigLoader }]; } });
|
|
@@ -6558,9 +6582,9 @@ class RouterScroller {
|
|
|
6558
6582
|
(_b = this.scrollEventsSubscription) === null || _b === void 0 ? void 0 : _b.unsubscribe();
|
|
6559
6583
|
}
|
|
6560
6584
|
}
|
|
6561
|
-
RouterScroller.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
6562
|
-
RouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
6563
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
6585
|
+
RouterScroller.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: RouterScroller, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
|
|
6586
|
+
RouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: RouterScroller });
|
|
6587
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: RouterScroller, decorators: [{
|
|
6564
6588
|
type: Injectable
|
|
6565
6589
|
}], ctorParameters: function () { return [{ type: UrlSerializer }, { type: NavigationTransitions }, { type: i3.ViewportScroller }, { type: i0.NgZone }, { type: undefined }]; } });
|
|
6566
6590
|
|
|
@@ -6615,10 +6639,6 @@ function provideRouter(routes, ...features) {
|
|
|
6615
6639
|
{ provide: ActivatedRoute, useFactory: rootRoute, deps: [Router] },
|
|
6616
6640
|
{ provide: APP_BOOTSTRAP_LISTENER, multi: true, useFactory: getBootstrapListener },
|
|
6617
6641
|
features.map(feature => feature.ɵproviders),
|
|
6618
|
-
// TODO: All options used by the `assignExtraOptionsToRouter` factory need to be reviewed for
|
|
6619
|
-
// how we want them to be configured. This API doesn't currently have a way to configure them
|
|
6620
|
-
// and we should decide what the _best_ way to do that is rather than just sticking with the
|
|
6621
|
-
// status quo of how it's done today.
|
|
6622
6642
|
]);
|
|
6623
6643
|
}
|
|
6624
6644
|
function rootRoute(router) {
|
|
@@ -6984,6 +7004,36 @@ function withRouterConfig(options) {
|
|
|
6984
7004
|
];
|
|
6985
7005
|
return routerFeature(5 /* RouterFeatureKind.RouterConfigurationFeature */, providers);
|
|
6986
7006
|
}
|
|
7007
|
+
/**
|
|
7008
|
+
* Provides the location strategy that uses the URL fragment instead of the history API.
|
|
7009
|
+
*
|
|
7010
|
+
* @usageNotes
|
|
7011
|
+
*
|
|
7012
|
+
* Basic example of how you can use the hash location option:
|
|
7013
|
+
* ```
|
|
7014
|
+
* const appRoutes: Routes = [];
|
|
7015
|
+
* bootstrapApplication(AppComponent,
|
|
7016
|
+
* {
|
|
7017
|
+
* providers: [
|
|
7018
|
+
* provideRouter(appRoutes, withHashLocation()
|
|
7019
|
+
* ]
|
|
7020
|
+
* }
|
|
7021
|
+
* );
|
|
7022
|
+
* ```
|
|
7023
|
+
*
|
|
7024
|
+
* @see `provideRouter`
|
|
7025
|
+
* @see `HashLocationStrategy`
|
|
7026
|
+
*
|
|
7027
|
+
* @returns A set of providers for use with `provideRouter`.
|
|
7028
|
+
*
|
|
7029
|
+
* @publicApi
|
|
7030
|
+
*/
|
|
7031
|
+
function withHashLocation() {
|
|
7032
|
+
const providers = [
|
|
7033
|
+
{ provide: LocationStrategy, useClass: HashLocationStrategy },
|
|
7034
|
+
];
|
|
7035
|
+
return routerFeature(5 /* RouterFeatureKind.RouterConfigurationFeature */, providers);
|
|
7036
|
+
}
|
|
6987
7037
|
|
|
6988
7038
|
/**
|
|
6989
7039
|
* @license
|
|
@@ -7008,7 +7058,7 @@ const ROUTER_FORROOT_GUARD = new InjectionToken(NG_DEV_MODE ? 'router duplicate
|
|
|
7008
7058
|
const ROUTER_PROVIDERS = [
|
|
7009
7059
|
Location,
|
|
7010
7060
|
{ provide: UrlSerializer, useClass: DefaultUrlSerializer },
|
|
7011
|
-
|
|
7061
|
+
Router,
|
|
7012
7062
|
ChildrenOutletContexts,
|
|
7013
7063
|
{ provide: ActivatedRoute, useFactory: rootRoute, deps: [Router] },
|
|
7014
7064
|
RouterConfigLoader,
|
|
@@ -7105,10 +7155,10 @@ class RouterModule {
|
|
|
7105
7155
|
};
|
|
7106
7156
|
}
|
|
7107
7157
|
}
|
|
7108
|
-
RouterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
7109
|
-
RouterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0-next.
|
|
7110
|
-
RouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
7111
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.
|
|
7158
|
+
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 });
|
|
7159
|
+
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] });
|
|
7160
|
+
RouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: RouterModule, imports: [ɵEmptyOutletComponent] });
|
|
7161
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: RouterModule, decorators: [{
|
|
7112
7162
|
type: NgModule,
|
|
7113
7163
|
args: [{
|
|
7114
7164
|
imports: ROUTER_DIRECTIVES,
|
|
@@ -7196,7 +7246,7 @@ function provideRouterInitializer() {
|
|
|
7196
7246
|
/**
|
|
7197
7247
|
* @publicApi
|
|
7198
7248
|
*/
|
|
7199
|
-
const VERSION = new Version('15.1.0-next.
|
|
7249
|
+
const VERSION = new Version('15.1.0-next.3');
|
|
7200
7250
|
|
|
7201
7251
|
/**
|
|
7202
7252
|
* @license
|
|
@@ -7235,5 +7285,5 @@ const VERSION = new Version('15.1.0-next.1');
|
|
|
7235
7285
|
* Generated bundle index. Do not edit.
|
|
7236
7286
|
*/
|
|
7237
7287
|
|
|
7238
|
-
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,
|
|
7288
|
+
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 };
|
|
7239
7289
|
//# sourceMappingURL=router.mjs.map
|