@angular/router 15.0.2 → 15.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +3 -3
- package/esm2020/src/directives/router_outlet.mjs +3 -3
- package/esm2020/src/navigation_transition.mjs +3 -3
- package/esm2020/src/page_title_strategy.mjs +6 -6
- package/esm2020/src/private_export.mjs +1 -2
- package/esm2020/src/provide_router.mjs +1 -5
- package/esm2020/src/route_reuse_strategy.mjs +6 -6
- package/esm2020/src/router.mjs +28 -75
- 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/url_handling_strategy.mjs +6 -6
- package/esm2020/src/url_tree.mjs +3 -3
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/testing/src/router_testing_module.mjs +47 -55
- package/fesm2015/router.mjs +163 -146
- package/fesm2015/router.mjs.map +1 -1
- package/fesm2015/testing.mjs +48 -56
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2015/upgrade.mjs +1 -1
- package/fesm2020/router.mjs +162 -145
- package/fesm2020/router.mjs.map +1 -1
- package/fesm2020/testing.mjs +48 -56
- package/fesm2020/testing.mjs.map +1 -1
- package/fesm2020/upgrade.mjs +1 -1
- package/index.d.ts +9 -15
- package/package.json +4 -4
- package/testing/index.d.ts +1 -7
- package/upgrade/index.d.ts +1 -1
package/fesm2020/router.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v15.0.
|
|
2
|
+
* @license Angular v15.0.4
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import * as i0 from '@angular/core';
|
|
8
|
-
import { ɵisObservable, ɵisPromise, ɵRuntimeError, Injectable, EventEmitter, inject, ViewContainerRef, ChangeDetectorRef, EnvironmentInjector, Directive, Input, Output, Component, createEnvironmentInjector, ɵisStandalone, ComponentFactoryResolver, ɵisInjectable, InjectionToken, InjectFlags, NgModuleFactory,
|
|
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.0.
|
|
465
|
-
UrlSerializer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.
|
|
466
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
464
|
+
UrlSerializer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: UrlSerializer, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
465
|
+
UrlSerializer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: UrlSerializer, providedIn: 'root', useFactory: () => new DefaultUrlSerializer() });
|
|
466
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: UrlSerializer, decorators: [{
|
|
467
467
|
type: Injectable,
|
|
468
468
|
args: [{ providedIn: 'root', useFactory: () => new DefaultUrlSerializer() }]
|
|
469
469
|
}] });
|
|
@@ -675,7 +675,7 @@ class UrlParser {
|
|
|
675
675
|
parseSegment() {
|
|
676
676
|
const path = matchSegments(this.remaining);
|
|
677
677
|
if (path === '' && this.peekStartsWith(';')) {
|
|
678
|
-
throw new ɵRuntimeError(4009 /* RuntimeErrorCode.EMPTY_PATH_WITH_PARAMS */, NG_DEV_MODE$
|
|
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
|
*
|
|
@@ -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$
|
|
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$
|
|
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$
|
|
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
|
}
|
|
@@ -1723,6 +1723,70 @@ function stringifyEvent(routerEvent) {
|
|
|
1723
1723
|
}
|
|
1724
1724
|
}
|
|
1725
1725
|
|
|
1726
|
+
/**
|
|
1727
|
+
* @license
|
|
1728
|
+
* Copyright Google LLC All Rights Reserved.
|
|
1729
|
+
*
|
|
1730
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
1731
|
+
* found in the LICENSE file at https://angular.io/license
|
|
1732
|
+
*/
|
|
1733
|
+
const NG_DEV_MODE$9 = typeof ngDevMode === 'undefined' || ngDevMode;
|
|
1734
|
+
class LegacyCreateUrlTree {
|
|
1735
|
+
createUrlTree(relativeTo, currentState, currentUrlTree, commands, queryParams, fragment) {
|
|
1736
|
+
const a = relativeTo || currentState.root;
|
|
1737
|
+
return createUrlTree(a, currentUrlTree, commands, queryParams, fragment);
|
|
1738
|
+
}
|
|
1739
|
+
}
|
|
1740
|
+
LegacyCreateUrlTree.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LegacyCreateUrlTree, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1741
|
+
LegacyCreateUrlTree.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LegacyCreateUrlTree });
|
|
1742
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LegacyCreateUrlTree, decorators: [{
|
|
1743
|
+
type: Injectable
|
|
1744
|
+
}] });
|
|
1745
|
+
class CreateUrlTreeUsingSnapshot {
|
|
1746
|
+
createUrlTree(relativeTo, currentState, currentUrlTree, commands, queryParams, fragment) {
|
|
1747
|
+
let relativeToUrlSegmentGroup;
|
|
1748
|
+
try {
|
|
1749
|
+
const relativeToSnapshot = relativeTo ? relativeTo.snapshot : currentState.snapshot.root;
|
|
1750
|
+
relativeToUrlSegmentGroup = createSegmentGroupFromRoute(relativeToSnapshot);
|
|
1751
|
+
}
|
|
1752
|
+
catch (e) {
|
|
1753
|
+
// This is strictly for backwards compatibility with tests that create
|
|
1754
|
+
// invalid `ActivatedRoute` mocks.
|
|
1755
|
+
// Note: the difference between having this fallback for invalid `ActivatedRoute` setups and
|
|
1756
|
+
// just throwing is ~500 test failures. Fixing all of those tests by hand is not feasible at
|
|
1757
|
+
// the moment.
|
|
1758
|
+
if (NG_DEV_MODE$9) {
|
|
1759
|
+
console.warn(`The ActivatedRoute has an invalid structure. This is likely due to an incomplete mock in tests.`);
|
|
1760
|
+
}
|
|
1761
|
+
if (typeof commands[0] !== 'string' || !commands[0].startsWith('/')) {
|
|
1762
|
+
// Navigations that were absolute in the old way of creating UrlTrees
|
|
1763
|
+
// would still work because they wouldn't attempt to match the
|
|
1764
|
+
// segments in the `ActivatedRoute` to the `currentUrlTree` but
|
|
1765
|
+
// instead just replace the root segment with the navigation result.
|
|
1766
|
+
// Non-absolute navigations would fail to apply the commands because
|
|
1767
|
+
// the logic could not find the segment to replace (so they'd act like there were no
|
|
1768
|
+
// commands).
|
|
1769
|
+
commands = [];
|
|
1770
|
+
}
|
|
1771
|
+
relativeToUrlSegmentGroup = currentUrlTree.root;
|
|
1772
|
+
}
|
|
1773
|
+
return createUrlTreeFromSegmentGroup(relativeToUrlSegmentGroup, commands, queryParams, fragment);
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
CreateUrlTreeUsingSnapshot.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CreateUrlTreeUsingSnapshot, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1777
|
+
CreateUrlTreeUsingSnapshot.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CreateUrlTreeUsingSnapshot });
|
|
1778
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CreateUrlTreeUsingSnapshot, decorators: [{
|
|
1779
|
+
type: Injectable
|
|
1780
|
+
}] });
|
|
1781
|
+
class CreateUrlTreeStrategy {
|
|
1782
|
+
}
|
|
1783
|
+
CreateUrlTreeStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CreateUrlTreeStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1784
|
+
CreateUrlTreeStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CreateUrlTreeStrategy, providedIn: 'root', useClass: LegacyCreateUrlTree });
|
|
1785
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CreateUrlTreeStrategy, decorators: [{
|
|
1786
|
+
type: Injectable,
|
|
1787
|
+
args: [{ providedIn: 'root', useClass: LegacyCreateUrlTree }]
|
|
1788
|
+
}] });
|
|
1789
|
+
|
|
1726
1790
|
/**
|
|
1727
1791
|
* @license
|
|
1728
1792
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -2380,9 +2444,9 @@ class ChildrenOutletContexts {
|
|
|
2380
2444
|
return this.contexts.get(childName) || null;
|
|
2381
2445
|
}
|
|
2382
2446
|
}
|
|
2383
|
-
ChildrenOutletContexts.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
2384
|
-
ChildrenOutletContexts.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.
|
|
2385
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
2447
|
+
ChildrenOutletContexts.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ChildrenOutletContexts, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2448
|
+
ChildrenOutletContexts.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ChildrenOutletContexts, providedIn: 'root' });
|
|
2449
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ChildrenOutletContexts, decorators: [{
|
|
2386
2450
|
type: Injectable,
|
|
2387
2451
|
args: [{ providedIn: 'root' }]
|
|
2388
2452
|
}] });
|
|
@@ -2602,9 +2666,9 @@ class RouterOutlet {
|
|
|
2602
2666
|
this.activateEvents.emit(this.activated.instance);
|
|
2603
2667
|
}
|
|
2604
2668
|
}
|
|
2605
|
-
RouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
2606
|
-
RouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.
|
|
2607
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
2669
|
+
RouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterOutlet, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2670
|
+
RouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: RouterOutlet, isStandalone: true, selector: "router-outlet", inputs: { name: "name" }, outputs: { activateEvents: "activate", deactivateEvents: "deactivate", attachEvents: "attach", detachEvents: "detach" }, exportAs: ["outlet"], usesOnChanges: true, ngImport: i0 });
|
|
2671
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterOutlet, decorators: [{
|
|
2608
2672
|
type: Directive,
|
|
2609
2673
|
args: [{
|
|
2610
2674
|
selector: 'router-outlet',
|
|
@@ -2664,9 +2728,9 @@ function isComponentFactoryResolver(item) {
|
|
|
2664
2728
|
*/
|
|
2665
2729
|
class ɵEmptyOutletComponent {
|
|
2666
2730
|
}
|
|
2667
|
-
ɵEmptyOutletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
2668
|
-
ɵEmptyOutletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.
|
|
2669
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
2731
|
+
ɵEmptyOutletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ɵEmptyOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2732
|
+
ɵEmptyOutletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ɵEmptyOutletComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: `<router-outlet></router-outlet>`, isInline: true, dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] });
|
|
2733
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ɵEmptyOutletComponent, decorators: [{
|
|
2670
2734
|
type: Component,
|
|
2671
2735
|
args: [{
|
|
2672
2736
|
template: `<router-outlet></router-outlet>`,
|
|
@@ -4312,7 +4376,7 @@ const NG_DEV_MODE$5 = typeof ngDevMode === 'undefined' || !!ngDevMode;
|
|
|
4312
4376
|
* `ROUTES` is a low level API for router configuration via dependency injection.
|
|
4313
4377
|
*
|
|
4314
4378
|
* We recommend that in almost all cases to use higher level APIs such as `RouterModule.forRoot()`,
|
|
4315
|
-
* `
|
|
4379
|
+
* `provideRouter`, or `Router.resetConfig()`.
|
|
4316
4380
|
*
|
|
4317
4381
|
* @publicApi
|
|
4318
4382
|
*/
|
|
@@ -4409,9 +4473,9 @@ class RouterConfigLoader {
|
|
|
4409
4473
|
}));
|
|
4410
4474
|
}
|
|
4411
4475
|
}
|
|
4412
|
-
RouterConfigLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
4413
|
-
RouterConfigLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.
|
|
4414
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
4476
|
+
RouterConfigLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterConfigLoader, deps: [{ token: i0.Injector }, { token: i0.Compiler }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4477
|
+
RouterConfigLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterConfigLoader, providedIn: 'root' });
|
|
4478
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterConfigLoader, decorators: [{
|
|
4415
4479
|
type: Injectable,
|
|
4416
4480
|
args: [{ providedIn: 'root' }]
|
|
4417
4481
|
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.Compiler }]; } });
|
|
@@ -4779,9 +4843,9 @@ class NavigationTransitions {
|
|
|
4779
4843
|
t.resolve(false);
|
|
4780
4844
|
}
|
|
4781
4845
|
}
|
|
4782
|
-
NavigationTransitions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
4783
|
-
NavigationTransitions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.
|
|
4784
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
4846
|
+
NavigationTransitions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NavigationTransitions, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4847
|
+
NavigationTransitions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NavigationTransitions, providedIn: 'root' });
|
|
4848
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NavigationTransitions, decorators: [{
|
|
4785
4849
|
type: Injectable,
|
|
4786
4850
|
args: [{ providedIn: 'root' }]
|
|
4787
4851
|
}], ctorParameters: function () { return []; } });
|
|
@@ -4840,9 +4904,9 @@ class TitleStrategy {
|
|
|
4840
4904
|
return snapshot.data[RouteTitleKey];
|
|
4841
4905
|
}
|
|
4842
4906
|
}
|
|
4843
|
-
TitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
4844
|
-
TitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.
|
|
4845
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
4907
|
+
TitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TitleStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4908
|
+
TitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TitleStrategy, providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) });
|
|
4909
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TitleStrategy, decorators: [{
|
|
4846
4910
|
type: Injectable,
|
|
4847
4911
|
args: [{ providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) }]
|
|
4848
4912
|
}] });
|
|
@@ -4866,9 +4930,9 @@ class DefaultTitleStrategy extends TitleStrategy {
|
|
|
4866
4930
|
}
|
|
4867
4931
|
}
|
|
4868
4932
|
}
|
|
4869
|
-
DefaultTitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
4870
|
-
DefaultTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.
|
|
4871
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
4933
|
+
DefaultTitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DefaultTitleStrategy, deps: [{ token: i1.Title }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4934
|
+
DefaultTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DefaultTitleStrategy, providedIn: 'root' });
|
|
4935
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DefaultTitleStrategy, decorators: [{
|
|
4872
4936
|
type: Injectable,
|
|
4873
4937
|
args: [{ providedIn: 'root' }]
|
|
4874
4938
|
}], ctorParameters: function () { return [{ type: i1.Title }]; } });
|
|
@@ -4889,9 +4953,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
|
|
|
4889
4953
|
*/
|
|
4890
4954
|
class RouteReuseStrategy {
|
|
4891
4955
|
}
|
|
4892
|
-
RouteReuseStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
4893
|
-
RouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.
|
|
4894
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
4956
|
+
RouteReuseStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouteReuseStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4957
|
+
RouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouteReuseStrategy, providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) });
|
|
4958
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouteReuseStrategy, decorators: [{
|
|
4895
4959
|
type: Injectable,
|
|
4896
4960
|
args: [{ providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) }]
|
|
4897
4961
|
}] });
|
|
@@ -4943,9 +5007,9 @@ class BaseRouteReuseStrategy {
|
|
|
4943
5007
|
}
|
|
4944
5008
|
class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {
|
|
4945
5009
|
}
|
|
4946
|
-
DefaultRouteReuseStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
4947
|
-
DefaultRouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.
|
|
4948
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
5010
|
+
DefaultRouteReuseStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DefaultRouteReuseStrategy, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
5011
|
+
DefaultRouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DefaultRouteReuseStrategy, providedIn: 'root' });
|
|
5012
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DefaultRouteReuseStrategy, decorators: [{
|
|
4949
5013
|
type: Injectable,
|
|
4950
5014
|
args: [{ providedIn: 'root' }]
|
|
4951
5015
|
}] });
|
|
@@ -4984,9 +5048,9 @@ const ROUTER_CONFIGURATION = new InjectionToken(NG_DEV_MODE$3 ? 'router config'
|
|
|
4984
5048
|
*/
|
|
4985
5049
|
class UrlHandlingStrategy {
|
|
4986
5050
|
}
|
|
4987
|
-
UrlHandlingStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
4988
|
-
UrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.
|
|
4989
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
5051
|
+
UrlHandlingStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: UrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5052
|
+
UrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: UrlHandlingStrategy, providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) });
|
|
5053
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: UrlHandlingStrategy, decorators: [{
|
|
4990
5054
|
type: Injectable,
|
|
4991
5055
|
args: [{ providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) }]
|
|
4992
5056
|
}] });
|
|
@@ -5004,9 +5068,9 @@ class DefaultUrlHandlingStrategy {
|
|
|
5004
5068
|
return newUrlPart;
|
|
5005
5069
|
}
|
|
5006
5070
|
}
|
|
5007
|
-
DefaultUrlHandlingStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
5008
|
-
DefaultUrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.
|
|
5009
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
5071
|
+
DefaultUrlHandlingStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DefaultUrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5072
|
+
DefaultUrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DefaultUrlHandlingStrategy, providedIn: 'root' });
|
|
5073
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DefaultUrlHandlingStrategy, decorators: [{
|
|
5010
5074
|
type: Injectable,
|
|
5011
5075
|
args: [{ providedIn: 'root' }]
|
|
5012
5076
|
}] });
|
|
@@ -5045,38 +5109,6 @@ const subsetMatchOptions = {
|
|
|
5045
5109
|
matrixParams: 'ignored',
|
|
5046
5110
|
queryParams: 'subset'
|
|
5047
5111
|
};
|
|
5048
|
-
function assignExtraOptionsToRouter(opts, router) {
|
|
5049
|
-
if (opts.errorHandler) {
|
|
5050
|
-
router.errorHandler = opts.errorHandler;
|
|
5051
|
-
}
|
|
5052
|
-
if (opts.malformedUriErrorHandler) {
|
|
5053
|
-
router.malformedUriErrorHandler = opts.malformedUriErrorHandler;
|
|
5054
|
-
}
|
|
5055
|
-
if (opts.onSameUrlNavigation) {
|
|
5056
|
-
router.onSameUrlNavigation = opts.onSameUrlNavigation;
|
|
5057
|
-
}
|
|
5058
|
-
if (opts.paramsInheritanceStrategy) {
|
|
5059
|
-
router.paramsInheritanceStrategy = opts.paramsInheritanceStrategy;
|
|
5060
|
-
}
|
|
5061
|
-
if (opts.urlUpdateStrategy) {
|
|
5062
|
-
router.urlUpdateStrategy = opts.urlUpdateStrategy;
|
|
5063
|
-
}
|
|
5064
|
-
if (opts.canceledNavigationResolution) {
|
|
5065
|
-
router.canceledNavigationResolution = opts.canceledNavigationResolution;
|
|
5066
|
-
}
|
|
5067
|
-
}
|
|
5068
|
-
function setupRouter() {
|
|
5069
|
-
const urlSerializer = inject(UrlSerializer);
|
|
5070
|
-
const contexts = inject(ChildrenOutletContexts);
|
|
5071
|
-
const location = inject(Location);
|
|
5072
|
-
const injector = inject(Injector);
|
|
5073
|
-
const compiler = inject(Compiler);
|
|
5074
|
-
const config = inject(ROUTES, { optional: true }) ?? [];
|
|
5075
|
-
const opts = inject(ROUTER_CONFIGURATION, { optional: true }) ?? {};
|
|
5076
|
-
const router = new Router(null, urlSerializer, contexts, location, injector, compiler, flatten(config));
|
|
5077
|
-
assignExtraOptionsToRouter(opts, router);
|
|
5078
|
-
return router;
|
|
5079
|
-
}
|
|
5080
5112
|
/**
|
|
5081
5113
|
* @description
|
|
5082
5114
|
*
|
|
@@ -5090,18 +5122,7 @@ function setupRouter() {
|
|
|
5090
5122
|
* @publicApi
|
|
5091
5123
|
*/
|
|
5092
5124
|
class Router {
|
|
5093
|
-
|
|
5094
|
-
* Creates the router service.
|
|
5095
|
-
*/
|
|
5096
|
-
// TODO: vsavkin make internal after the final is out.
|
|
5097
|
-
constructor(
|
|
5098
|
-
/** @internal */
|
|
5099
|
-
rootComponentType, urlSerializer, rootContexts, location, injector, compiler, config) {
|
|
5100
|
-
this.rootComponentType = rootComponentType;
|
|
5101
|
-
this.urlSerializer = urlSerializer;
|
|
5102
|
-
this.rootContexts = rootContexts;
|
|
5103
|
-
this.location = location;
|
|
5104
|
-
this.config = config;
|
|
5125
|
+
constructor() {
|
|
5105
5126
|
this.disposed = false;
|
|
5106
5127
|
/**
|
|
5107
5128
|
* The id of the currently active page in the router.
|
|
@@ -5112,18 +5133,20 @@ class Router {
|
|
|
5112
5133
|
* page.
|
|
5113
5134
|
*/
|
|
5114
5135
|
this.currentPageId = 0;
|
|
5136
|
+
this.console = inject(ɵConsole);
|
|
5115
5137
|
this.isNgZoneEnabled = false;
|
|
5138
|
+
this.options = inject(ROUTER_CONFIGURATION, { optional: true }) || {};
|
|
5116
5139
|
/**
|
|
5117
5140
|
* A handler for navigation errors in this NgModule.
|
|
5118
5141
|
*/
|
|
5119
|
-
this.errorHandler = defaultErrorHandler;
|
|
5142
|
+
this.errorHandler = this.options.errorHandler || defaultErrorHandler;
|
|
5120
5143
|
/**
|
|
5121
5144
|
* A handler for errors thrown by `Router.parseUrl(url)`
|
|
5122
5145
|
* when `url` contains an invalid character.
|
|
5123
5146
|
* The most common case is a `%` sign
|
|
5124
5147
|
* that's not encoded and is not part of a percent encoded sequence.
|
|
5125
5148
|
*/
|
|
5126
|
-
this.malformedUriErrorHandler = defaultMalformedUriErrorHandler;
|
|
5149
|
+
this.malformedUriErrorHandler = this.options.malformedUriErrorHandler || defaultMalformedUriErrorHandler;
|
|
5127
5150
|
/**
|
|
5128
5151
|
* True if at least one navigation event has occurred,
|
|
5129
5152
|
* false otherwise.
|
|
@@ -5146,6 +5169,8 @@ class Router {
|
|
|
5146
5169
|
* A strategy for re-using routes.
|
|
5147
5170
|
*/
|
|
5148
5171
|
this.routeReuseStrategy = inject(RouteReuseStrategy);
|
|
5172
|
+
/** Strategy used to create a UrlTree. */
|
|
5173
|
+
this.urlCreationStrategy = inject(CreateUrlTreeStrategy);
|
|
5149
5174
|
/**
|
|
5150
5175
|
* A strategy for setting the title based on the `routerState`.
|
|
5151
5176
|
*/
|
|
@@ -5163,7 +5188,7 @@ class Router {
|
|
|
5163
5188
|
* routed components on same url navigation, you need to set `onSameUrlNavigation` to `'reload'`
|
|
5164
5189
|
* _and_ provide a `RouteReuseStrategy` which returns `false` for `shouldReuseRoute`.
|
|
5165
5190
|
*/
|
|
5166
|
-
this.onSameUrlNavigation = 'ignore';
|
|
5191
|
+
this.onSameUrlNavigation = this.options.onSameUrlNavigation || 'ignore';
|
|
5167
5192
|
/**
|
|
5168
5193
|
* How to merge parameters, data, resolved data, and title from parent to child
|
|
5169
5194
|
* routes. One of:
|
|
@@ -5173,7 +5198,7 @@ class Router {
|
|
|
5173
5198
|
* - `'always'` : Inherit parent parameters, data, and resolved data
|
|
5174
5199
|
* for all child routes.
|
|
5175
5200
|
*/
|
|
5176
|
-
this.paramsInheritanceStrategy = 'emptyOnly';
|
|
5201
|
+
this.paramsInheritanceStrategy = this.options.paramsInheritanceStrategy || 'emptyOnly';
|
|
5177
5202
|
/**
|
|
5178
5203
|
* Determines when the router updates the browser URL.
|
|
5179
5204
|
* By default (`"deferred"`), updates the browser URL after navigation has finished.
|
|
@@ -5181,7 +5206,7 @@ class Router {
|
|
|
5181
5206
|
* You can choose to update early so that, if navigation fails,
|
|
5182
5207
|
* you can show an error message with the URL that failed.
|
|
5183
5208
|
*/
|
|
5184
|
-
this.urlUpdateStrategy = 'deferred';
|
|
5209
|
+
this.urlUpdateStrategy = this.options.urlUpdateStrategy || 'deferred';
|
|
5185
5210
|
/**
|
|
5186
5211
|
* Configures how the Router attempts to restore state when a navigation is cancelled.
|
|
5187
5212
|
*
|
|
@@ -5204,12 +5229,15 @@ class Router {
|
|
|
5204
5229
|
* The default value is `replace`.
|
|
5205
5230
|
*
|
|
5206
5231
|
*/
|
|
5207
|
-
this.canceledNavigationResolution = 'replace';
|
|
5232
|
+
this.canceledNavigationResolution = this.options.canceledNavigationResolution || 'replace';
|
|
5233
|
+
this.config = flatten(inject(ROUTES, { optional: true }) ?? []);
|
|
5208
5234
|
this.navigationTransitions = inject(NavigationTransitions);
|
|
5209
|
-
this.
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
this.
|
|
5235
|
+
this.urlSerializer = inject(UrlSerializer);
|
|
5236
|
+
this.location = inject(Location);
|
|
5237
|
+
/** @internal */
|
|
5238
|
+
this.rootComponentType = null;
|
|
5239
|
+
this.isNgZoneEnabled = inject(NgZone) instanceof NgZone && NgZone.isInAngularZone();
|
|
5240
|
+
this.resetConfig(this.config);
|
|
5213
5241
|
this.currentUrlTree = new UrlTree();
|
|
5214
5242
|
this.rawUrlTree = this.currentUrlTree;
|
|
5215
5243
|
this.browserUrlTree = this.currentUrlTree;
|
|
@@ -5244,10 +5272,7 @@ class Router {
|
|
|
5244
5272
|
// the change.
|
|
5245
5273
|
return this.navigationTransitions.events;
|
|
5246
5274
|
}
|
|
5247
|
-
/**
|
|
5248
|
-
* @internal
|
|
5249
|
-
* TODO: this should be removed once the constructor of the router made internal
|
|
5250
|
-
*/
|
|
5275
|
+
/** @internal */
|
|
5251
5276
|
resetRootComponentType(rootComponentType) {
|
|
5252
5277
|
this.rootComponentType = rootComponentType;
|
|
5253
5278
|
// TODO: vsavkin router 4.0 should make the root component set to null
|
|
@@ -5401,7 +5426,6 @@ class Router {
|
|
|
5401
5426
|
*/
|
|
5402
5427
|
createUrlTree(commands, navigationExtras = {}) {
|
|
5403
5428
|
const { relativeTo, queryParams, fragment, queryParamsHandling, preserveFragment } = navigationExtras;
|
|
5404
|
-
const a = relativeTo || this.routerState.root;
|
|
5405
5429
|
const f = preserveFragment ? this.currentUrlTree.fragment : fragment;
|
|
5406
5430
|
let q = null;
|
|
5407
5431
|
switch (queryParamsHandling) {
|
|
@@ -5417,7 +5441,7 @@ class Router {
|
|
|
5417
5441
|
if (q !== null) {
|
|
5418
5442
|
q = this.removeEmptyProps(q);
|
|
5419
5443
|
}
|
|
5420
|
-
return createUrlTree(
|
|
5444
|
+
return this.urlCreationStrategy.createUrlTree(relativeTo, this.routerState, this.currentUrlTree, commands, q, f ?? null);
|
|
5421
5445
|
}
|
|
5422
5446
|
/**
|
|
5423
5447
|
* Navigates to a view using an absolute route path.
|
|
@@ -5674,15 +5698,12 @@ class Router {
|
|
|
5674
5698
|
return { navigationId };
|
|
5675
5699
|
}
|
|
5676
5700
|
}
|
|
5677
|
-
Router.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
5678
|
-
Router.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.
|
|
5679
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
5701
|
+
Router.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: Router, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5702
|
+
Router.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: Router, providedIn: 'root' });
|
|
5703
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: Router, decorators: [{
|
|
5680
5704
|
type: Injectable,
|
|
5681
|
-
args: [{
|
|
5682
|
-
|
|
5683
|
-
useFactory: setupRouter,
|
|
5684
|
-
}]
|
|
5685
|
-
}], ctorParameters: function () { return [{ type: i0.Type }, { type: UrlSerializer }, { type: ChildrenOutletContexts }, { type: i3.Location }, { type: i0.Injector }, { type: i0.Compiler }, { type: undefined }]; } });
|
|
5705
|
+
args: [{ providedIn: 'root' }]
|
|
5706
|
+
}], ctorParameters: function () { return []; } });
|
|
5686
5707
|
function validateCommands(commands) {
|
|
5687
5708
|
for (let i = 0; i < commands.length; i++) {
|
|
5688
5709
|
const cmd = commands[i];
|
|
@@ -5972,9 +5993,9 @@ class RouterLink {
|
|
|
5972
5993
|
});
|
|
5973
5994
|
}
|
|
5974
5995
|
}
|
|
5975
|
-
RouterLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
5976
|
-
RouterLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.
|
|
5977
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
5996
|
+
RouterLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterLink, deps: [{ token: Router }, { token: ActivatedRoute }, { token: 'tabindex', attribute: true }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i3.LocationStrategy }], target: i0.ɵɵFactoryTarget.Directive });
|
|
5997
|
+
RouterLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: RouterLink, isStandalone: true, selector: "[routerLink]", inputs: { target: "target", queryParams: "queryParams", fragment: "fragment", queryParamsHandling: "queryParamsHandling", state: "state", relativeTo: "relativeTo", preserveFragment: "preserveFragment", skipLocationChange: "skipLocationChange", replaceUrl: "replaceUrl", routerLink: "routerLink" }, host: { listeners: { "click": "onClick($event.button,$event.ctrlKey,$event.shiftKey,$event.altKey,$event.metaKey)" }, properties: { "attr.target": "this.target" } }, usesOnChanges: true, ngImport: i0 });
|
|
5998
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterLink, decorators: [{
|
|
5978
5999
|
type: Directive,
|
|
5979
6000
|
args: [{
|
|
5980
6001
|
selector: '[routerLink]',
|
|
@@ -6199,9 +6220,9 @@ class RouterLinkActive {
|
|
|
6199
6220
|
return this.link && isActiveCheckFn(this.link) || this.links.some(isActiveCheckFn);
|
|
6200
6221
|
}
|
|
6201
6222
|
}
|
|
6202
|
-
RouterLinkActive.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
6203
|
-
RouterLinkActive.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.
|
|
6204
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
6223
|
+
RouterLinkActive.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterLinkActive, deps: [{ token: Router }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: RouterLink, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
6224
|
+
RouterLinkActive.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: RouterLinkActive, isStandalone: true, selector: "[routerLinkActive]", inputs: { routerLinkActiveOptions: "routerLinkActiveOptions", ariaCurrentWhenActive: "ariaCurrentWhenActive", routerLinkActive: "routerLinkActive" }, outputs: { isActiveChange: "isActiveChange" }, queries: [{ propertyName: "links", predicate: RouterLink, descendants: true }], exportAs: ["routerLinkActive"], usesOnChanges: true, ngImport: i0 });
|
|
6225
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterLinkActive, decorators: [{
|
|
6205
6226
|
type: Directive,
|
|
6206
6227
|
args: [{
|
|
6207
6228
|
selector: '[routerLinkActive]',
|
|
@@ -6261,9 +6282,9 @@ class PreloadAllModules {
|
|
|
6261
6282
|
return fn().pipe(catchError(() => of(null)));
|
|
6262
6283
|
}
|
|
6263
6284
|
}
|
|
6264
|
-
PreloadAllModules.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
6265
|
-
PreloadAllModules.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.
|
|
6266
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
6285
|
+
PreloadAllModules.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PreloadAllModules, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6286
|
+
PreloadAllModules.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PreloadAllModules, providedIn: 'root' });
|
|
6287
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PreloadAllModules, decorators: [{
|
|
6267
6288
|
type: Injectable,
|
|
6268
6289
|
args: [{ providedIn: 'root' }]
|
|
6269
6290
|
}] });
|
|
@@ -6281,9 +6302,9 @@ class NoPreloading {
|
|
|
6281
6302
|
return of(null);
|
|
6282
6303
|
}
|
|
6283
6304
|
}
|
|
6284
|
-
NoPreloading.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
6285
|
-
NoPreloading.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.
|
|
6286
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
6305
|
+
NoPreloading.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NoPreloading, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6306
|
+
NoPreloading.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NoPreloading, providedIn: 'root' });
|
|
6307
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NoPreloading, decorators: [{
|
|
6287
6308
|
type: Injectable,
|
|
6288
6309
|
args: [{ providedIn: 'root' }]
|
|
6289
6310
|
}] });
|
|
@@ -6377,9 +6398,9 @@ class RouterPreloader {
|
|
|
6377
6398
|
});
|
|
6378
6399
|
}
|
|
6379
6400
|
}
|
|
6380
|
-
RouterPreloader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
6381
|
-
RouterPreloader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.
|
|
6382
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
6401
|
+
RouterPreloader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterPreloader, deps: [{ token: Router }, { token: i0.Compiler }, { token: i0.EnvironmentInjector }, { token: PreloadingStrategy }, { token: RouterConfigLoader }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6402
|
+
RouterPreloader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterPreloader, providedIn: 'root' });
|
|
6403
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterPreloader, decorators: [{
|
|
6383
6404
|
type: Injectable,
|
|
6384
6405
|
args: [{ providedIn: 'root' }]
|
|
6385
6406
|
}], ctorParameters: function () { return [{ type: Router }, { type: i0.Compiler }, { type: i0.EnvironmentInjector }, { type: PreloadingStrategy }, { type: RouterConfigLoader }]; } });
|
|
@@ -6474,9 +6495,9 @@ class RouterScroller {
|
|
|
6474
6495
|
this.scrollEventsSubscription?.unsubscribe();
|
|
6475
6496
|
}
|
|
6476
6497
|
}
|
|
6477
|
-
RouterScroller.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
6478
|
-
RouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.
|
|
6479
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
6498
|
+
RouterScroller.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterScroller, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
|
|
6499
|
+
RouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterScroller });
|
|
6500
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterScroller, decorators: [{
|
|
6480
6501
|
type: Injectable
|
|
6481
6502
|
}], ctorParameters: function () { return [{ type: UrlSerializer }, { type: NavigationTransitions }, { type: i3.ViewportScroller }, { type: i0.NgZone }, { type: undefined }]; } });
|
|
6482
6503
|
|
|
@@ -6531,10 +6552,6 @@ function provideRouter(routes, ...features) {
|
|
|
6531
6552
|
{ provide: ActivatedRoute, useFactory: rootRoute, deps: [Router] },
|
|
6532
6553
|
{ provide: APP_BOOTSTRAP_LISTENER, multi: true, useFactory: getBootstrapListener },
|
|
6533
6554
|
features.map(feature => feature.ɵproviders),
|
|
6534
|
-
// TODO: All options used by the `assignExtraOptionsToRouter` factory need to be reviewed for
|
|
6535
|
-
// how we want them to be configured. This API doesn't currently have a way to configure them
|
|
6536
|
-
// and we should decide what the _best_ way to do that is rather than just sticking with the
|
|
6537
|
-
// status quo of how it's done today.
|
|
6538
6555
|
]);
|
|
6539
6556
|
}
|
|
6540
6557
|
function rootRoute(router) {
|
|
@@ -6922,7 +6939,7 @@ const ROUTER_FORROOT_GUARD = new InjectionToken(NG_DEV_MODE ? 'router duplicate
|
|
|
6922
6939
|
const ROUTER_PROVIDERS = [
|
|
6923
6940
|
Location,
|
|
6924
6941
|
{ provide: UrlSerializer, useClass: DefaultUrlSerializer },
|
|
6925
|
-
|
|
6942
|
+
Router,
|
|
6926
6943
|
ChildrenOutletContexts,
|
|
6927
6944
|
{ provide: ActivatedRoute, useFactory: rootRoute, deps: [Router] },
|
|
6928
6945
|
RouterConfigLoader,
|
|
@@ -7019,10 +7036,10 @@ class RouterModule {
|
|
|
7019
7036
|
};
|
|
7020
7037
|
}
|
|
7021
7038
|
}
|
|
7022
|
-
RouterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
7023
|
-
RouterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.
|
|
7024
|
-
RouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.
|
|
7025
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
7039
|
+
RouterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterModule, deps: [{ token: ROUTER_FORROOT_GUARD, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
7040
|
+
RouterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: RouterModule, imports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent], exports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent] });
|
|
7041
|
+
RouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterModule, imports: [ɵEmptyOutletComponent] });
|
|
7042
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterModule, decorators: [{
|
|
7026
7043
|
type: NgModule,
|
|
7027
7044
|
args: [{
|
|
7028
7045
|
imports: ROUTER_DIRECTIVES,
|
|
@@ -7108,7 +7125,7 @@ function provideRouterInitializer() {
|
|
|
7108
7125
|
/**
|
|
7109
7126
|
* @publicApi
|
|
7110
7127
|
*/
|
|
7111
|
-
const VERSION = new Version('15.0.
|
|
7128
|
+
const VERSION = new Version('15.0.4');
|
|
7112
7129
|
|
|
7113
7130
|
/**
|
|
7114
7131
|
* @license
|
|
@@ -7147,5 +7164,5 @@ const VERSION = new Version('15.0.2');
|
|
|
7147
7164
|
* Generated bundle index. Do not edit.
|
|
7148
7165
|
*/
|
|
7149
7166
|
|
|
7150
|
-
export { ActivatedRoute, ActivatedRouteSnapshot, ActivationEnd, ActivationStart, BaseRouteReuseStrategy, ChildActivationEnd, ChildActivationStart, ChildrenOutletContexts, DefaultTitleStrategy, DefaultUrlSerializer, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, NoPreloading, OutletContext, PRIMARY_OUTLET, PreloadAllModules, PreloadingStrategy, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, ROUTES, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouteReuseStrategy, Router, RouterEvent, RouterLink, RouterLinkActive, RouterLink as RouterLinkWithHref, RouterModule, RouterOutlet, RouterPreloader, RouterState, RouterStateSnapshot, RoutesRecognized, Scroll, TitleStrategy, UrlHandlingStrategy, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree, VERSION, convertToParamMap, createUrlTreeFromSnapshot, defaultUrlMatcher, provideRouter, provideRoutes, withDebugTracing, withDisabledInitialNavigation, withEnabledBlockingInitialNavigation, withInMemoryScrolling, withPreloading, withRouterConfig, ɵEmptyOutletComponent, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS,
|
|
7167
|
+
export { ActivatedRoute, ActivatedRouteSnapshot, ActivationEnd, ActivationStart, BaseRouteReuseStrategy, ChildActivationEnd, ChildActivationStart, ChildrenOutletContexts, DefaultTitleStrategy, DefaultUrlSerializer, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, NoPreloading, OutletContext, PRIMARY_OUTLET, PreloadAllModules, PreloadingStrategy, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, ROUTES, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouteReuseStrategy, Router, RouterEvent, RouterLink, RouterLinkActive, RouterLink as RouterLinkWithHref, RouterModule, RouterOutlet, RouterPreloader, RouterState, RouterStateSnapshot, RoutesRecognized, Scroll, TitleStrategy, UrlHandlingStrategy, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree, VERSION, convertToParamMap, createUrlTreeFromSnapshot, defaultUrlMatcher, provideRouter, provideRoutes, withDebugTracing, withDisabledInitialNavigation, withEnabledBlockingInitialNavigation, withInMemoryScrolling, withPreloading, withRouterConfig, ɵEmptyOutletComponent, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS, flatten as ɵflatten, withPreloading as ɵwithPreloading };
|
|
7151
7168
|
//# sourceMappingURL=router.mjs.map
|