@angular/router 13.0.0-rc.0 → 13.0.0
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_router_state.mjs +3 -14
- package/esm2020/src/directives/router_link.mjs +6 -6
- package/esm2020/src/directives/router_link_active.mjs +3 -3
- package/esm2020/src/directives/router_outlet.mjs +3 -3
- package/esm2020/src/operators/activate_routes.mjs +8 -6
- package/esm2020/src/router.mjs +30 -30
- package/esm2020/src/router_module.mjs +11 -8
- package/esm2020/src/router_preloader.mjs +3 -3
- package/esm2020/src/router_scroller.mjs +3 -3
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/testing/src/router_testing_module.mjs +4 -4
- package/fesm2015/router.mjs +72 -77
- package/fesm2015/router.mjs.map +1 -1
- package/fesm2015/testing.mjs +5 -5
- package/fesm2015/upgrade.mjs +1 -1
- package/fesm2020/router.mjs +71 -77
- package/fesm2020/router.mjs.map +1 -1
- package/fesm2020/testing.mjs +5 -5
- package/fesm2020/upgrade.mjs +1 -1
- package/package.json +4 -4
- package/router.d.ts +23 -1
- package/testing/testing.d.ts +1 -1
- package/upgrade/upgrade.d.ts +1 -1
package/fesm2015/testing.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v13.0.0
|
|
2
|
+
* @license Angular v13.0.0
|
|
3
3
|
* (c) 2010-2021 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -93,9 +93,9 @@ class RouterTestingModule {
|
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
RouterTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0
|
|
97
|
-
RouterTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.0
|
|
98
|
-
RouterTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.0
|
|
96
|
+
RouterTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: RouterTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
97
|
+
RouterTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: RouterTestingModule, exports: [RouterModule] });
|
|
98
|
+
RouterTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: RouterTestingModule, providers: [
|
|
99
99
|
ɵROUTER_PROVIDERS,
|
|
100
100
|
EXTRA_ROUTER_TESTING_PROVIDERS,
|
|
101
101
|
{ provide: Location, useClass: SpyLocation },
|
|
@@ -112,7 +112,7 @@ RouterTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", ver
|
|
|
112
112
|
{ provide: PreloadingStrategy, useExisting: NoPreloading },
|
|
113
113
|
provideRoutes([]),
|
|
114
114
|
], imports: [RouterModule] });
|
|
115
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0
|
|
115
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: RouterTestingModule, decorators: [{
|
|
116
116
|
type: NgModule,
|
|
117
117
|
args: [{
|
|
118
118
|
exports: [RouterModule],
|
package/fesm2015/upgrade.mjs
CHANGED
package/fesm2020/router.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v13.0.0
|
|
2
|
+
* @license Angular v13.0.0
|
|
3
3
|
* (c) 2010-2021 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -1679,7 +1679,8 @@ function createNode(routeReuseStrategy, curr, prevState) {
|
|
|
1679
1679
|
const detachedRouteHandle = routeReuseStrategy.retrieve(curr.value);
|
|
1680
1680
|
if (detachedRouteHandle !== null) {
|
|
1681
1681
|
const tree = detachedRouteHandle.route;
|
|
1682
|
-
|
|
1682
|
+
tree.value._futureSnapshot = curr.value;
|
|
1683
|
+
tree.children = curr.children.map(c => createNode(routeReuseStrategy, c));
|
|
1683
1684
|
return tree;
|
|
1684
1685
|
}
|
|
1685
1686
|
}
|
|
@@ -1688,18 +1689,6 @@ function createNode(routeReuseStrategy, curr, prevState) {
|
|
|
1688
1689
|
return new TreeNode(value, children);
|
|
1689
1690
|
}
|
|
1690
1691
|
}
|
|
1691
|
-
function setFutureSnapshotsOfActivatedRoutes(curr, result) {
|
|
1692
|
-
if (curr.value.routeConfig !== result.value.routeConfig) {
|
|
1693
|
-
throw new Error('Cannot reattach ActivatedRouteSnapshot created from a different route');
|
|
1694
|
-
}
|
|
1695
|
-
if (curr.children.length !== result.children.length) {
|
|
1696
|
-
throw new Error('Cannot reattach ActivatedRouteSnapshot with a different number of children');
|
|
1697
|
-
}
|
|
1698
|
-
result.value._futureSnapshot = curr.value;
|
|
1699
|
-
for (let i = 0; i < curr.children.length; ++i) {
|
|
1700
|
-
setFutureSnapshotsOfActivatedRoutes(curr.children[i], result.children[i]);
|
|
1701
|
-
}
|
|
1702
|
-
}
|
|
1703
1692
|
function createOrReuseChildren(routeReuseStrategy, curr, prevState) {
|
|
1704
1693
|
return curr.children.map(child => {
|
|
1705
1694
|
for (const p of prevState.children) {
|
|
@@ -2081,6 +2070,11 @@ class ActivateRoutes {
|
|
|
2081
2070
|
}
|
|
2082
2071
|
detachAndStoreRouteSubtree(route, parentContexts) {
|
|
2083
2072
|
const context = parentContexts.getContext(route.value.outlet);
|
|
2073
|
+
const contexts = context && route.value.component ? context.children : parentContexts;
|
|
2074
|
+
const children = nodeChildrenAsMap(route);
|
|
2075
|
+
for (const childOutlet of Object.keys(children)) {
|
|
2076
|
+
this.deactivateRouteAndItsChildren(children[childOutlet], contexts);
|
|
2077
|
+
}
|
|
2084
2078
|
if (context && context.outlet) {
|
|
2085
2079
|
const componentRef = context.outlet.detach();
|
|
2086
2080
|
const contexts = context.children.onOutletDeactivated();
|
|
@@ -2149,7 +2143,8 @@ class ActivateRoutes {
|
|
|
2149
2143
|
// Otherwise attach from `RouterOutlet.ngOnInit` when it is instantiated
|
|
2150
2144
|
context.outlet.attach(stored.componentRef, stored.route.value);
|
|
2151
2145
|
}
|
|
2152
|
-
|
|
2146
|
+
advanceActivatedRoute(stored.route.value);
|
|
2147
|
+
this.activateChildRoutes(futureNode, null, context.children);
|
|
2153
2148
|
}
|
|
2154
2149
|
else {
|
|
2155
2150
|
const config = parentLoadedConfig(future.snapshot);
|
|
@@ -2172,10 +2167,6 @@ class ActivateRoutes {
|
|
|
2172
2167
|
}
|
|
2173
2168
|
}
|
|
2174
2169
|
}
|
|
2175
|
-
function advanceActivatedRouteNodeAndItsChildren(node) {
|
|
2176
|
-
advanceActivatedRoute(node.value);
|
|
2177
|
-
node.children.forEach(advanceActivatedRouteNodeAndItsChildren);
|
|
2178
|
-
}
|
|
2179
2170
|
function parentLoadedConfig(snapshot) {
|
|
2180
2171
|
for (let s = snapshot.parent; s; s = s.parent) {
|
|
2181
2172
|
const route = s.routeConfig;
|
|
@@ -2531,9 +2522,9 @@ class RouterOutlet {
|
|
|
2531
2522
|
this.activateEvents.emit(this.activated.instance);
|
|
2532
2523
|
}
|
|
2533
2524
|
}
|
|
2534
|
-
RouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0
|
|
2535
|
-
RouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.0
|
|
2536
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0
|
|
2525
|
+
RouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: RouterOutlet, deps: [{ token: ChildrenOutletContexts }, { token: i0.ViewContainerRef }, { token: i0.ComponentFactoryResolver }, { token: 'name', attribute: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2526
|
+
RouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.0", type: RouterOutlet, selector: "router-outlet", outputs: { activateEvents: "activate", deactivateEvents: "deactivate", attachEvents: "attach", detachEvents: "detach" }, exportAs: ["outlet"], ngImport: i0 });
|
|
2527
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: RouterOutlet, decorators: [{
|
|
2537
2528
|
type: Directive,
|
|
2538
2529
|
args: [{ selector: 'router-outlet', exportAs: 'outlet' }]
|
|
2539
2530
|
}], ctorParameters: function () { return [{ type: ChildrenOutletContexts }, { type: i0.ViewContainerRef }, { type: i0.ComponentFactoryResolver }, { type: undefined, decorators: [{
|
|
@@ -2587,9 +2578,9 @@ class OutletInjector {
|
|
|
2587
2578
|
*/
|
|
2588
2579
|
class ɵEmptyOutletComponent {
|
|
2589
2580
|
}
|
|
2590
|
-
ɵEmptyOutletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0
|
|
2591
|
-
ɵEmptyOutletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.0
|
|
2592
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0
|
|
2581
|
+
ɵEmptyOutletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: ɵEmptyOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2582
|
+
ɵEmptyOutletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.0", type: ɵEmptyOutletComponent, selector: "ng-component", ngImport: i0, template: `<router-outlet></router-outlet>`, isInline: true, directives: [{ type: RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] });
|
|
2583
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: ɵEmptyOutletComponent, decorators: [{
|
|
2593
2584
|
type: Component,
|
|
2594
2585
|
args: [{ template: `<router-outlet></router-outlet>` }]
|
|
2595
2586
|
}] });
|
|
@@ -4456,10 +4447,11 @@ class Router {
|
|
|
4456
4447
|
const cancelationReason = `Navigation ID ${t.id} is not equal to the current navigation id ${this.navigationId}`;
|
|
4457
4448
|
this.cancelNavigationTransition(t, cancelationReason);
|
|
4458
4449
|
}
|
|
4459
|
-
//
|
|
4460
|
-
//
|
|
4461
|
-
|
|
4462
|
-
|
|
4450
|
+
// Only clear current navigation if it is still set to the one that
|
|
4451
|
+
// finalized.
|
|
4452
|
+
if (this.currentNavigation?.id === t.id) {
|
|
4453
|
+
this.currentNavigation = null;
|
|
4454
|
+
}
|
|
4463
4455
|
}), catchError((e) => {
|
|
4464
4456
|
// TODO(atscott): The NavigationTransition `t` used here does not accurately
|
|
4465
4457
|
// reflect the current state of the whole transition because some operations
|
|
@@ -4484,7 +4476,7 @@ class Router {
|
|
|
4484
4476
|
// This is only applicable with initial navigation, so setting
|
|
4485
4477
|
// `navigated` only when not redirecting resolves this scenario.
|
|
4486
4478
|
this.navigated = true;
|
|
4487
|
-
this.restoreHistory(t);
|
|
4479
|
+
this.restoreHistory(t, true);
|
|
4488
4480
|
}
|
|
4489
4481
|
const navCancel = new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), e.message);
|
|
4490
4482
|
eventsSubject.next(navCancel);
|
|
@@ -4516,7 +4508,7 @@ class Router {
|
|
|
4516
4508
|
* the pre-error state. */
|
|
4517
4509
|
}
|
|
4518
4510
|
else {
|
|
4519
|
-
this.restoreHistory(t);
|
|
4511
|
+
this.restoreHistory(t, true);
|
|
4520
4512
|
const navError = new NavigationError(t.id, this.serializeUrl(t.extractedUrl), e);
|
|
4521
4513
|
eventsSubject.next(navError);
|
|
4522
4514
|
try {
|
|
@@ -4833,26 +4825,18 @@ class Router {
|
|
|
4833
4825
|
if (this.disposed) {
|
|
4834
4826
|
return Promise.resolve(false);
|
|
4835
4827
|
}
|
|
4836
|
-
//
|
|
4837
|
-
// router states.
|
|
4838
|
-
//
|
|
4839
|
-
// the user follows that with a navigation using the back/forward button or manual URL change,
|
|
4840
|
-
// the destination may be the same as the previous imperative attempt. We should not skip
|
|
4841
|
-
// these navigations because it's a separate case from the one above -- it's not a duplicate
|
|
4842
|
-
// navigation.
|
|
4828
|
+
// Duplicate navigations may be triggered by attempts to sync AngularJS and
|
|
4829
|
+
// Angular router states. We have the setTimeout in the location listener to
|
|
4830
|
+
// ensure the imperative nav is scheduled before the browser nav.
|
|
4843
4831
|
const lastNavigation = this.transitions.value;
|
|
4844
|
-
// We don't want to skip duplicate successful navs if they're imperative because
|
|
4845
|
-
// onSameUrlNavigation could be 'reload' (so the duplicate is intended).
|
|
4846
4832
|
const browserNavPrecededByRouterNav = isBrowserTriggeredNavigation(source) && lastNavigation &&
|
|
4847
4833
|
!isBrowserTriggeredNavigation(lastNavigation.source);
|
|
4848
|
-
const
|
|
4849
|
-
|
|
4850
|
-
//
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
const duplicateNav = lastNavigationUrl.toString() === rawUrl.toString();
|
|
4855
|
-
if (browserNavPrecededByRouterNav && duplicateNav) {
|
|
4834
|
+
const navToSameUrl = lastNavigation.rawUrl.toString() === rawUrl.toString();
|
|
4835
|
+
const lastNavigationInProgress = lastNavigation.id === this.currentNavigation?.id;
|
|
4836
|
+
// We consider duplicates as ones that goes to the same URL while the first
|
|
4837
|
+
// is still processing.
|
|
4838
|
+
const isDuplicateNav = navToSameUrl && lastNavigationInProgress;
|
|
4839
|
+
if (browserNavPrecededByRouterNav && isDuplicateNav) {
|
|
4856
4840
|
return Promise.resolve(true); // return value is not used
|
|
4857
4841
|
}
|
|
4858
4842
|
let resolve;
|
|
@@ -4932,7 +4916,7 @@ class Router {
|
|
|
4932
4916
|
* Performs the necessary rollback action to restore the browser URL to the
|
|
4933
4917
|
* state before the transition.
|
|
4934
4918
|
*/
|
|
4935
|
-
restoreHistory(t) {
|
|
4919
|
+
restoreHistory(t, restoringFromCaughtError = false) {
|
|
4936
4920
|
if (this.canceledNavigationResolution === 'computed') {
|
|
4937
4921
|
const targetPagePosition = this.currentPageId - t.targetPageId;
|
|
4938
4922
|
// The navigator change the location before triggered the browser event,
|
|
@@ -4953,6 +4937,7 @@ class Router {
|
|
|
4953
4937
|
// TODO(atscott): resetting the `browserUrlTree` should really be done in `resetState`.
|
|
4954
4938
|
// Investigate if this can be done by running TGP.
|
|
4955
4939
|
this.browserUrlTree = t.currentUrlTree;
|
|
4940
|
+
this.resetUrlToCurrentUrlTree();
|
|
4956
4941
|
}
|
|
4957
4942
|
else {
|
|
4958
4943
|
// The browser URL and router state was not updated before the navigation cancelled so
|
|
@@ -4960,7 +4945,14 @@ class Router {
|
|
|
4960
4945
|
}
|
|
4961
4946
|
}
|
|
4962
4947
|
else if (this.canceledNavigationResolution === 'replace') {
|
|
4963
|
-
|
|
4948
|
+
// TODO(atscott): It seems like we should _always_ reset the state here. It would be a no-op
|
|
4949
|
+
// for `deferred` navigations that haven't change the internal state yet because guards
|
|
4950
|
+
// reject. For 'eager' navigations, it seems like we also really should reset the state
|
|
4951
|
+
// because the navigation was cancelled. Investigate if this can be done by running TGP.
|
|
4952
|
+
if (restoringFromCaughtError) {
|
|
4953
|
+
this.resetState(t);
|
|
4954
|
+
}
|
|
4955
|
+
this.resetUrlToCurrentUrlTree();
|
|
4964
4956
|
}
|
|
4965
4957
|
}
|
|
4966
4958
|
resetState(t) {
|
|
@@ -4972,7 +4964,6 @@ class Router {
|
|
|
4972
4964
|
// addition, the URLHandlingStrategy may be configured to specifically preserve parts of the URL
|
|
4973
4965
|
// when merging, such as the query params so they are not lost on a refresh.
|
|
4974
4966
|
this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, t.rawUrl);
|
|
4975
|
-
this.resetUrlToCurrentUrlTree();
|
|
4976
4967
|
}
|
|
4977
4968
|
resetUrlToCurrentUrlTree() {
|
|
4978
4969
|
this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree), '', this.generateNgRouterState(this.lastSuccessfulId, this.currentPageId));
|
|
@@ -4989,9 +4980,9 @@ class Router {
|
|
|
4989
4980
|
return { navigationId };
|
|
4990
4981
|
}
|
|
4991
4982
|
}
|
|
4992
|
-
Router.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0
|
|
4993
|
-
Router.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.0
|
|
4994
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0
|
|
4983
|
+
Router.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: Router, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
|
|
4984
|
+
Router.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: Router });
|
|
4985
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: Router, decorators: [{
|
|
4995
4986
|
type: Injectable
|
|
4996
4987
|
}], ctorParameters: function () { return [{ type: i0.Type }, { type: UrlSerializer }, { type: ChildrenOutletContexts }, { type: i3.Location }, { type: i0.Injector }, { type: i0.Compiler }, { type: undefined }]; } });
|
|
4997
4988
|
function validateCommands(commands) {
|
|
@@ -5190,9 +5181,9 @@ class RouterLink {
|
|
|
5190
5181
|
});
|
|
5191
5182
|
}
|
|
5192
5183
|
}
|
|
5193
|
-
RouterLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0
|
|
5194
|
-
RouterLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.0
|
|
5195
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0
|
|
5184
|
+
RouterLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: RouterLink, deps: [{ token: Router }, { token: ActivatedRoute }, { token: 'tabindex', attribute: true }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
5185
|
+
RouterLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.0", type: RouterLink, selector: ":not(a):not(area)[routerLink]", inputs: { queryParams: "queryParams", fragment: "fragment", queryParamsHandling: "queryParamsHandling", preserveFragment: "preserveFragment", skipLocationChange: "skipLocationChange", replaceUrl: "replaceUrl", state: "state", relativeTo: "relativeTo", routerLink: "routerLink" }, host: { listeners: { "click": "onClick()" } }, usesOnChanges: true, ngImport: i0 });
|
|
5186
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: RouterLink, decorators: [{
|
|
5196
5187
|
type: Directive,
|
|
5197
5188
|
args: [{ selector: ':not(a):not(area)[routerLink]' }]
|
|
5198
5189
|
}], ctorParameters: function () { return [{ type: Router }, { type: ActivatedRoute }, { type: undefined, decorators: [{
|
|
@@ -5309,9 +5300,9 @@ class RouterLinkWithHref {
|
|
|
5309
5300
|
});
|
|
5310
5301
|
}
|
|
5311
5302
|
}
|
|
5312
|
-
RouterLinkWithHref.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0
|
|
5313
|
-
RouterLinkWithHref.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.0
|
|
5314
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0
|
|
5303
|
+
RouterLinkWithHref.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: RouterLinkWithHref, deps: [{ token: Router }, { token: ActivatedRoute }, { token: i3.LocationStrategy }], target: i0.ɵɵFactoryTarget.Directive });
|
|
5304
|
+
RouterLinkWithHref.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.0", type: RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: { target: "target", queryParams: "queryParams", fragment: "fragment", queryParamsHandling: "queryParamsHandling", preserveFragment: "preserveFragment", skipLocationChange: "skipLocationChange", replaceUrl: "replaceUrl", state: "state", relativeTo: "relativeTo", routerLink: "routerLink" }, host: { listeners: { "click": "onClick($event.button,$event.ctrlKey,$event.shiftKey,$event.altKey,$event.metaKey)" }, properties: { "attr.target": "this.target", "attr.href": "this.href" } }, usesOnChanges: true, ngImport: i0 });
|
|
5305
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: RouterLinkWithHref, decorators: [{
|
|
5315
5306
|
type: Directive,
|
|
5316
5307
|
args: [{ selector: 'a[routerLink],area[routerLink]' }]
|
|
5317
5308
|
}], ctorParameters: function () { return [{ type: Router }, { type: ActivatedRoute }, { type: i3.LocationStrategy }]; }, propDecorators: { target: [{
|
|
@@ -5523,9 +5514,9 @@ class RouterLinkActive {
|
|
|
5523
5514
|
this.links.some(isActiveCheckFn) || this.linksWithHrefs.some(isActiveCheckFn);
|
|
5524
5515
|
}
|
|
5525
5516
|
}
|
|
5526
|
-
RouterLinkActive.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0
|
|
5527
|
-
RouterLinkActive.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.0
|
|
5528
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0
|
|
5517
|
+
RouterLinkActive.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: RouterLinkActive, deps: [{ token: Router }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: RouterLink, optional: true }, { token: RouterLinkWithHref, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
5518
|
+
RouterLinkActive.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.0", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: { routerLinkActiveOptions: "routerLinkActiveOptions", routerLinkActive: "routerLinkActive" }, outputs: { isActiveChange: "isActiveChange" }, queries: [{ propertyName: "links", predicate: RouterLink, descendants: true }, { propertyName: "linksWithHrefs", predicate: RouterLinkWithHref, descendants: true }], exportAs: ["routerLinkActive"], usesOnChanges: true, ngImport: i0 });
|
|
5519
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: RouterLinkActive, decorators: [{
|
|
5529
5520
|
type: Directive,
|
|
5530
5521
|
args: [{
|
|
5531
5522
|
selector: '[routerLinkActive]',
|
|
@@ -5668,9 +5659,9 @@ class RouterPreloader {
|
|
|
5668
5659
|
});
|
|
5669
5660
|
}
|
|
5670
5661
|
}
|
|
5671
|
-
RouterPreloader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0
|
|
5672
|
-
RouterPreloader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.0
|
|
5673
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0
|
|
5662
|
+
RouterPreloader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: RouterPreloader, deps: [{ token: Router }, { token: i0.Compiler }, { token: i0.Injector }, { token: PreloadingStrategy }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5663
|
+
RouterPreloader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: RouterPreloader });
|
|
5664
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: RouterPreloader, decorators: [{
|
|
5674
5665
|
type: Injectable
|
|
5675
5666
|
}], ctorParameters: function () { return [{ type: Router }, { type: i0.Compiler }, { type: i0.Injector }, { type: PreloadingStrategy }]; } });
|
|
5676
5667
|
|
|
@@ -5756,9 +5747,9 @@ class RouterScroller {
|
|
|
5756
5747
|
}
|
|
5757
5748
|
}
|
|
5758
5749
|
}
|
|
5759
|
-
RouterScroller.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0
|
|
5760
|
-
RouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.0
|
|
5761
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0
|
|
5750
|
+
RouterScroller.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: RouterScroller, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
|
|
5751
|
+
RouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: RouterScroller });
|
|
5752
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: RouterScroller, decorators: [{
|
|
5762
5753
|
type: Injectable
|
|
5763
5754
|
}], ctorParameters: function () { return [{ type: Router }, { type: i3.ViewportScroller }, { type: undefined }]; } });
|
|
5764
5755
|
|
|
@@ -5899,10 +5890,10 @@ class RouterModule {
|
|
|
5899
5890
|
return { ngModule: RouterModule, providers: [provideRoutes(routes)] };
|
|
5900
5891
|
}
|
|
5901
5892
|
}
|
|
5902
|
-
RouterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0
|
|
5903
|
-
RouterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.0
|
|
5904
|
-
RouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.0
|
|
5905
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0
|
|
5893
|
+
RouterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: RouterModule, deps: [{ token: ROUTER_FORROOT_GUARD, optional: true }, { token: Router, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
5894
|
+
RouterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: RouterModule, declarations: [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, ɵEmptyOutletComponent], exports: [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, ɵEmptyOutletComponent] });
|
|
5895
|
+
RouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: RouterModule });
|
|
5896
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: RouterModule, decorators: [{
|
|
5906
5897
|
type: NgModule,
|
|
5907
5898
|
args: [{
|
|
5908
5899
|
declarations: ROUTER_DIRECTIVES,
|
|
@@ -5995,6 +5986,9 @@ function assignExtraOptionsToRouter(opts, router) {
|
|
|
5995
5986
|
if (opts.urlUpdateStrategy) {
|
|
5996
5987
|
router.urlUpdateStrategy = opts.urlUpdateStrategy;
|
|
5997
5988
|
}
|
|
5989
|
+
if (opts.canceledNavigationResolution) {
|
|
5990
|
+
router.canceledNavigationResolution = opts.canceledNavigationResolution;
|
|
5991
|
+
}
|
|
5998
5992
|
}
|
|
5999
5993
|
function rootRoute(router) {
|
|
6000
5994
|
return router.routerState.root;
|
|
@@ -6078,9 +6072,9 @@ class RouterInitializer {
|
|
|
6078
6072
|
this.destroyed = true;
|
|
6079
6073
|
}
|
|
6080
6074
|
}
|
|
6081
|
-
RouterInitializer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0
|
|
6082
|
-
RouterInitializer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.0
|
|
6083
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0
|
|
6075
|
+
RouterInitializer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: RouterInitializer, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6076
|
+
RouterInitializer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: RouterInitializer });
|
|
6077
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: RouterInitializer, decorators: [{
|
|
6084
6078
|
type: Injectable
|
|
6085
6079
|
}], ctorParameters: function () { return [{ type: i0.Injector }]; } });
|
|
6086
6080
|
function getAppInitializer(r) {
|
|
@@ -6120,7 +6114,7 @@ function provideRouterInitializer() {
|
|
|
6120
6114
|
/**
|
|
6121
6115
|
* @publicApi
|
|
6122
6116
|
*/
|
|
6123
|
-
const VERSION = new Version('13.0.0
|
|
6117
|
+
const VERSION = new Version('13.0.0');
|
|
6124
6118
|
|
|
6125
6119
|
/**
|
|
6126
6120
|
* @license
|