@angular/router 13.0.0-next.10 → 13.0.0-next.11
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/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/router.mjs +9 -16
- package/esm2020/src/router_module.mjs +7 -7
- 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/extra_router_testing_providers.mjs +10 -0
- package/esm2020/testing/src/router_testing_module.mjs +20 -11
- package/esm2020/testing/src/spy_ng_module_factory_loader.mjs +10 -0
- package/esm2020/testing/src/testing.mjs +2 -1
- package/fesm2015/router.mjs +38 -45
- package/fesm2015/router.mjs.map +1 -1
- package/fesm2015/testing.mjs +39 -11
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2015/upgrade.mjs +1 -1
- package/fesm2020/router.mjs +38 -45
- package/fesm2020/router.mjs.map +1 -1
- package/fesm2020/testing.mjs +39 -11
- package/fesm2020/testing.mjs.map +1 -1
- package/fesm2020/upgrade.mjs +1 -1
- package/package.json +4 -4
- package/router.d.ts +1 -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-next.
|
|
2
|
+
* @license Angular v13.0.0-next.11
|
|
3
3
|
* (c) 2010-2021 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -10,6 +10,16 @@ import * as i0 from '@angular/core';
|
|
|
10
10
|
import { Compiler, Injector, Optional, NgModule } from '@angular/core';
|
|
11
11
|
import { Router, ɵflatten, ɵassignExtraOptionsToRouter, provideRoutes, ROUTER_CONFIGURATION, RouterModule, ɵROUTER_PROVIDERS, UrlSerializer, ChildrenOutletContexts, ROUTES, UrlHandlingStrategy, RouteReuseStrategy, PreloadingStrategy, NoPreloading } from '@angular/router';
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* @license
|
|
15
|
+
* Copyright Google LLC All Rights Reserved.
|
|
16
|
+
*
|
|
17
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
18
|
+
* found in the LICENSE file at https://angular.io/license
|
|
19
|
+
*/
|
|
20
|
+
// This file exists to easily patch the SpyNgModuleFactoryLoader into g3
|
|
21
|
+
const EXTRA_ROUTER_TESTING_PROVIDERS = [];
|
|
22
|
+
|
|
13
23
|
/**
|
|
14
24
|
* @license
|
|
15
25
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -83,11 +93,14 @@ class RouterTestingModule {
|
|
|
83
93
|
};
|
|
84
94
|
}
|
|
85
95
|
}
|
|
86
|
-
RouterTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.
|
|
87
|
-
RouterTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.0-next.
|
|
88
|
-
RouterTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.0-next.
|
|
89
|
-
ɵROUTER_PROVIDERS,
|
|
90
|
-
|
|
96
|
+
RouterTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.11", ngImport: i0, type: RouterTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
97
|
+
RouterTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.0-next.11", ngImport: i0, type: RouterTestingModule, exports: [RouterModule] });
|
|
98
|
+
RouterTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.0-next.11", ngImport: i0, type: RouterTestingModule, providers: [
|
|
99
|
+
ɵROUTER_PROVIDERS,
|
|
100
|
+
EXTRA_ROUTER_TESTING_PROVIDERS,
|
|
101
|
+
{ provide: Location, useClass: SpyLocation },
|
|
102
|
+
{ provide: LocationStrategy, useClass: MockLocationStrategy },
|
|
103
|
+
{
|
|
91
104
|
provide: Router,
|
|
92
105
|
useFactory: setupTestingRouter,
|
|
93
106
|
deps: [
|
|
@@ -96,15 +109,19 @@ RouterTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", ver
|
|
|
96
109
|
[RouteReuseStrategy, new Optional()]
|
|
97
110
|
]
|
|
98
111
|
},
|
|
99
|
-
{ provide: PreloadingStrategy, useExisting: NoPreloading },
|
|
112
|
+
{ provide: PreloadingStrategy, useExisting: NoPreloading },
|
|
113
|
+
provideRoutes([]),
|
|
100
114
|
], imports: [RouterModule] });
|
|
101
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.
|
|
115
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.11", ngImport: i0, type: RouterTestingModule, decorators: [{
|
|
102
116
|
type: NgModule,
|
|
103
117
|
args: [{
|
|
104
118
|
exports: [RouterModule],
|
|
105
119
|
providers: [
|
|
106
|
-
ɵROUTER_PROVIDERS,
|
|
107
|
-
|
|
120
|
+
ɵROUTER_PROVIDERS,
|
|
121
|
+
EXTRA_ROUTER_TESTING_PROVIDERS,
|
|
122
|
+
{ provide: Location, useClass: SpyLocation },
|
|
123
|
+
{ provide: LocationStrategy, useClass: MockLocationStrategy },
|
|
124
|
+
{
|
|
108
125
|
provide: Router,
|
|
109
126
|
useFactory: setupTestingRouter,
|
|
110
127
|
deps: [
|
|
@@ -113,11 +130,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.10",
|
|
|
113
130
|
[RouteReuseStrategy, new Optional()]
|
|
114
131
|
]
|
|
115
132
|
},
|
|
116
|
-
{ provide: PreloadingStrategy, useExisting: NoPreloading },
|
|
133
|
+
{ provide: PreloadingStrategy, useExisting: NoPreloading },
|
|
134
|
+
provideRoutes([]),
|
|
117
135
|
]
|
|
118
136
|
}]
|
|
119
137
|
}] });
|
|
120
138
|
|
|
139
|
+
/**
|
|
140
|
+
* @license
|
|
141
|
+
* Copyright Google LLC All Rights Reserved.
|
|
142
|
+
*
|
|
143
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
144
|
+
* found in the LICENSE file at https://angular.io/license
|
|
145
|
+
*/
|
|
146
|
+
// This file exists for easily patching SpyNgModuleFactoryLoader in g3
|
|
147
|
+
var spy_ng_module_factory_loader = {};
|
|
148
|
+
|
|
121
149
|
/**
|
|
122
150
|
* @license
|
|
123
151
|
* Copyright Google LLC All Rights Reserved.
|
package/fesm2015/testing.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.mjs","sources":["../../../../../../packages/router/testing/src/router_testing_module.ts","../../../../../../packages/router/testing/src/testing.ts","../../../../../../packages/router/testing/public_api.ts","../../../../../../packages/router/testing/index.ts","../../../../../../packages/router/testing/testing.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Location, LocationStrategy} from '@angular/common';\nimport {MockLocationStrategy, SpyLocation} from '@angular/common/testing';\nimport {Compiler, Injector, ModuleWithProviders, NgModule, Optional} from '@angular/core';\nimport {ChildrenOutletContexts, ExtraOptions, NoPreloading, PreloadingStrategy, provideRoutes, Route, Router, ROUTER_CONFIGURATION, RouteReuseStrategy, RouterModule, ROUTES, Routes, UrlHandlingStrategy, UrlSerializer, ɵassignExtraOptionsToRouter as assignExtraOptionsToRouter, ɵflatten as flatten, ɵROUTER_PROVIDERS as ROUTER_PROVIDERS} from '@angular/router';\n\nfunction isUrlHandlingStrategy(opts: ExtraOptions|\n UrlHandlingStrategy): opts is UrlHandlingStrategy {\n // This property check is needed because UrlHandlingStrategy is an interface and doesn't exist at\n // runtime.\n return 'shouldProcessUrl' in opts;\n}\n\n/**\n * Router setup factory function used for testing.\n *\n * @publicApi\n */\nexport function setupTestingRouter(\n urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location,\n compiler: Compiler, injector: Injector, routes: Route[][],\n opts?: ExtraOptions|UrlHandlingStrategy, urlHandlingStrategy?: UrlHandlingStrategy,\n routeReuseStrategy?: RouteReuseStrategy) {\n const router =\n new Router(null!, urlSerializer, contexts, location, injector, compiler, flatten(routes));\n if (opts) {\n // Handle deprecated argument ordering.\n if (isUrlHandlingStrategy(opts)) {\n router.urlHandlingStrategy = opts;\n } else {\n // Handle ExtraOptions\n assignExtraOptionsToRouter(opts, router);\n }\n }\n\n if (urlHandlingStrategy) {\n router.urlHandlingStrategy = urlHandlingStrategy;\n }\n\n if (routeReuseStrategy) {\n router.routeReuseStrategy = routeReuseStrategy;\n }\n\n return router;\n}\n\n/**\n * @description\n *\n * Sets up the router to be used for testing.\n *\n * The modules sets up the router to be used for testing.\n * It provides spy implementations of `Location` and `LocationStrategy`.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * beforeEach(() => {\n * TestBed.configureTestingModule({\n * imports: [\n * RouterTestingModule.withRoutes(\n * [{path: '', component: BlankCmp}, {path: 'simple', component: SimpleCmp}]\n * )\n * ]\n * });\n * });\n * ```\n *\n * @publicApi\n */\n@NgModule({\n exports: [RouterModule],\n providers: [\n ROUTER_PROVIDERS
|
|
1
|
+
{"version":3,"file":"testing.mjs","sources":["../../../../../../packages/router/testing/src/extra_router_testing_providers.ts","../../../../../../packages/router/testing/src/router_testing_module.ts","../../../../../../packages/router/testing/src/spy_ng_module_factory_loader.ts","../../../../../../packages/router/testing/src/testing.ts","../../../../../../packages/router/testing/public_api.ts","../../../../../../packages/router/testing/index.ts","../../../../../../packages/router/testing/testing.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file exists to easily patch the SpyNgModuleFactoryLoader into g3\nexport const EXTRA_ROUTER_TESTING_PROVIDERS = [];\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Location, LocationStrategy} from '@angular/common';\nimport {MockLocationStrategy, SpyLocation} from '@angular/common/testing';\nimport {Compiler, Injector, ModuleWithProviders, NgModule, Optional} from '@angular/core';\nimport {ChildrenOutletContexts, ExtraOptions, NoPreloading, PreloadingStrategy, provideRoutes, Route, Router, ROUTER_CONFIGURATION, RouteReuseStrategy, RouterModule, ROUTES, Routes, UrlHandlingStrategy, UrlSerializer, ɵassignExtraOptionsToRouter as assignExtraOptionsToRouter, ɵflatten as flatten, ɵROUTER_PROVIDERS as ROUTER_PROVIDERS} from '@angular/router';\nimport {EXTRA_ROUTER_TESTING_PROVIDERS} from './extra_router_testing_providers';\n\nfunction isUrlHandlingStrategy(opts: ExtraOptions|\n UrlHandlingStrategy): opts is UrlHandlingStrategy {\n // This property check is needed because UrlHandlingStrategy is an interface and doesn't exist at\n // runtime.\n return 'shouldProcessUrl' in opts;\n}\n\n/**\n * Router setup factory function used for testing.\n *\n * @publicApi\n */\nexport function setupTestingRouter(\n urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location,\n compiler: Compiler, injector: Injector, routes: Route[][],\n opts?: ExtraOptions|UrlHandlingStrategy, urlHandlingStrategy?: UrlHandlingStrategy,\n routeReuseStrategy?: RouteReuseStrategy) {\n const router =\n new Router(null!, urlSerializer, contexts, location, injector, compiler, flatten(routes));\n if (opts) {\n // Handle deprecated argument ordering.\n if (isUrlHandlingStrategy(opts)) {\n router.urlHandlingStrategy = opts;\n } else {\n // Handle ExtraOptions\n assignExtraOptionsToRouter(opts, router);\n }\n }\n\n if (urlHandlingStrategy) {\n router.urlHandlingStrategy = urlHandlingStrategy;\n }\n\n if (routeReuseStrategy) {\n router.routeReuseStrategy = routeReuseStrategy;\n }\n\n return router;\n}\n\n/**\n * @description\n *\n * Sets up the router to be used for testing.\n *\n * The modules sets up the router to be used for testing.\n * It provides spy implementations of `Location` and `LocationStrategy`.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * beforeEach(() => {\n * TestBed.configureTestingModule({\n * imports: [\n * RouterTestingModule.withRoutes(\n * [{path: '', component: BlankCmp}, {path: 'simple', component: SimpleCmp}]\n * )\n * ]\n * });\n * });\n * ```\n *\n * @publicApi\n */\n@NgModule({\n exports: [RouterModule],\n providers: [\n ROUTER_PROVIDERS,\n EXTRA_ROUTER_TESTING_PROVIDERS,\n {provide: Location, useClass: SpyLocation},\n {provide: LocationStrategy, useClass: MockLocationStrategy},\n {\n provide: Router,\n useFactory: setupTestingRouter,\n deps: [\n UrlSerializer, ChildrenOutletContexts, Location, Compiler, Injector, ROUTES,\n ROUTER_CONFIGURATION, [UrlHandlingStrategy, new Optional()],\n [RouteReuseStrategy, new Optional()]\n ]\n },\n {provide: PreloadingStrategy, useExisting: NoPreloading},\n provideRoutes([]),\n ]\n})\nexport class RouterTestingModule {\n static withRoutes(routes: Routes, config?: ExtraOptions):\n ModuleWithProviders<RouterTestingModule> {\n return {\n ngModule: RouterTestingModule,\n providers: [\n provideRoutes(routes),\n {provide: ROUTER_CONFIGURATION, useValue: config ? config : {}},\n ]\n };\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file exists for easily patching SpyNgModuleFactoryLoader in g3\nexport default {};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the router/testing package.\n */\nexport * from './router_testing_module';\nexport * from './spy_ng_module_factory_loader';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\nexport * from './src/testing';\n\n// This file only reexports content of the `src` folder. Keep it that way.\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file is not used to build this module. It is only used during editing\n// by the TypeScript language service and during build for verification. `ngc`\n// replaces this file with production index.ts when it rewrites private symbol\n// names.\n\nexport * from './public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["flatten","assignExtraOptionsToRouter","ROUTER_PROVIDERS"],"mappings":"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"}
|
package/fesm2015/upgrade.mjs
CHANGED
package/fesm2020/router.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v13.0.0-next.
|
|
2
|
+
* @license Angular v13.0.0-next.11
|
|
3
3
|
* (c) 2010-2021 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -2530,9 +2530,9 @@ class RouterOutlet {
|
|
|
2530
2530
|
this.activateEvents.emit(this.activated.instance);
|
|
2531
2531
|
}
|
|
2532
2532
|
}
|
|
2533
|
-
RouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.
|
|
2534
|
-
RouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.0-next.
|
|
2535
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.
|
|
2533
|
+
RouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.11", ngImport: i0, type: RouterOutlet, deps: [{ token: ChildrenOutletContexts }, { token: i0.ViewContainerRef }, { token: i0.ComponentFactoryResolver }, { token: 'name', attribute: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2534
|
+
RouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.0-next.11", type: RouterOutlet, selector: "router-outlet", outputs: { activateEvents: "activate", deactivateEvents: "deactivate", attachEvents: "attach", detachEvents: "detach" }, exportAs: ["outlet"], ngImport: i0 });
|
|
2535
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.11", ngImport: i0, type: RouterOutlet, decorators: [{
|
|
2536
2536
|
type: Directive,
|
|
2537
2537
|
args: [{ selector: 'router-outlet', exportAs: 'outlet' }]
|
|
2538
2538
|
}], ctorParameters: function () { return [{ type: ChildrenOutletContexts }, { type: i0.ViewContainerRef }, { type: i0.ComponentFactoryResolver }, { type: undefined, decorators: [{
|
|
@@ -2586,9 +2586,9 @@ class OutletInjector {
|
|
|
2586
2586
|
*/
|
|
2587
2587
|
class ɵEmptyOutletComponent {
|
|
2588
2588
|
}
|
|
2589
|
-
ɵEmptyOutletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.
|
|
2590
|
-
ɵEmptyOutletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.0-next.
|
|
2591
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.
|
|
2589
|
+
ɵEmptyOutletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.11", ngImport: i0, type: ɵEmptyOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2590
|
+
ɵEmptyOutletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.0-next.11", 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"] }] });
|
|
2591
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.11", ngImport: i0, type: ɵEmptyOutletComponent, decorators: [{
|
|
2592
2592
|
type: Component,
|
|
2593
2593
|
args: [{ template: `<router-outlet></router-outlet>` }]
|
|
2594
2594
|
}] });
|
|
@@ -4483,7 +4483,7 @@ class Router {
|
|
|
4483
4483
|
// This is only applicable with initial navigation, so setting
|
|
4484
4484
|
// `navigated` only when not redirecting resolves this scenario.
|
|
4485
4485
|
this.navigated = true;
|
|
4486
|
-
this.restoreHistory(t
|
|
4486
|
+
this.restoreHistory(t);
|
|
4487
4487
|
}
|
|
4488
4488
|
const navCancel = new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), e.message);
|
|
4489
4489
|
eventsSubject.next(navCancel);
|
|
@@ -4515,7 +4515,7 @@ class Router {
|
|
|
4515
4515
|
* the pre-error state. */
|
|
4516
4516
|
}
|
|
4517
4517
|
else {
|
|
4518
|
-
this.restoreHistory(t
|
|
4518
|
+
this.restoreHistory(t);
|
|
4519
4519
|
const navError = new NavigationError(t.id, this.serializeUrl(t.extractedUrl), e);
|
|
4520
4520
|
eventsSubject.next(navError);
|
|
4521
4521
|
try {
|
|
@@ -4931,7 +4931,7 @@ class Router {
|
|
|
4931
4931
|
* Performs the necessary rollback action to restore the browser URL to the
|
|
4932
4932
|
* state before the transition.
|
|
4933
4933
|
*/
|
|
4934
|
-
restoreHistory(t
|
|
4934
|
+
restoreHistory(t) {
|
|
4935
4935
|
if (this.canceledNavigationResolution === 'computed') {
|
|
4936
4936
|
const targetPagePosition = this.currentPageId - t.targetPageId;
|
|
4937
4937
|
// The navigator change the location before triggered the browser event,
|
|
@@ -4952,7 +4952,6 @@ class Router {
|
|
|
4952
4952
|
// TODO(atscott): resetting the `browserUrlTree` should really be done in `resetState`.
|
|
4953
4953
|
// Investigate if this can be done by running TGP.
|
|
4954
4954
|
this.browserUrlTree = t.currentUrlTree;
|
|
4955
|
-
this.resetUrlToCurrentUrlTree();
|
|
4956
4955
|
}
|
|
4957
4956
|
else {
|
|
4958
4957
|
// The browser URL and router state was not updated before the navigation cancelled so
|
|
@@ -4960,14 +4959,7 @@ class Router {
|
|
|
4960
4959
|
}
|
|
4961
4960
|
}
|
|
4962
4961
|
else if (this.canceledNavigationResolution === 'replace') {
|
|
4963
|
-
|
|
4964
|
-
// for `deferred` navigations that haven't change the internal state yet because guards
|
|
4965
|
-
// reject. For 'eager' navigations, it seems like we also really should reset the state
|
|
4966
|
-
// because the navigation was cancelled. Investigate if this can be done by running TGP.
|
|
4967
|
-
if (restoringFromCaughtError) {
|
|
4968
|
-
this.resetState(t);
|
|
4969
|
-
}
|
|
4970
|
-
this.resetUrlToCurrentUrlTree();
|
|
4962
|
+
this.resetState(t);
|
|
4971
4963
|
}
|
|
4972
4964
|
}
|
|
4973
4965
|
resetState(t) {
|
|
@@ -4979,6 +4971,7 @@ class Router {
|
|
|
4979
4971
|
// addition, the URLHandlingStrategy may be configured to specifically preserve parts of the URL
|
|
4980
4972
|
// when merging, such as the query params so they are not lost on a refresh.
|
|
4981
4973
|
this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, t.rawUrl);
|
|
4974
|
+
this.resetUrlToCurrentUrlTree();
|
|
4982
4975
|
}
|
|
4983
4976
|
resetUrlToCurrentUrlTree() {
|
|
4984
4977
|
this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree), '', this.generateNgRouterState(this.lastSuccessfulId, this.currentPageId));
|
|
@@ -4995,9 +4988,9 @@ class Router {
|
|
|
4995
4988
|
return { navigationId };
|
|
4996
4989
|
}
|
|
4997
4990
|
}
|
|
4998
|
-
Router.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.
|
|
4999
|
-
Router.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.0-next.
|
|
5000
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.
|
|
4991
|
+
Router.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.11", ngImport: i0, type: Router, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
|
|
4992
|
+
Router.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.0-next.11", ngImport: i0, type: Router });
|
|
4993
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.11", ngImport: i0, type: Router, decorators: [{
|
|
5001
4994
|
type: Injectable
|
|
5002
4995
|
}], ctorParameters: function () { return [{ type: i0.Type }, { type: UrlSerializer }, { type: ChildrenOutletContexts }, { type: i3.Location }, { type: i0.Injector }, { type: i0.Compiler }, { type: undefined }]; } });
|
|
5003
4996
|
function validateCommands(commands) {
|
|
@@ -5196,9 +5189,9 @@ class RouterLink {
|
|
|
5196
5189
|
});
|
|
5197
5190
|
}
|
|
5198
5191
|
}
|
|
5199
|
-
RouterLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.
|
|
5200
|
-
RouterLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.0-next.
|
|
5201
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.
|
|
5192
|
+
RouterLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.11", ngImport: i0, type: RouterLink, deps: [{ token: Router }, { token: ActivatedRoute }, { token: 'tabindex', attribute: true }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
5193
|
+
RouterLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.0-next.11", 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 });
|
|
5194
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.11", ngImport: i0, type: RouterLink, decorators: [{
|
|
5202
5195
|
type: Directive,
|
|
5203
5196
|
args: [{ selector: ':not(a):not(area)[routerLink]' }]
|
|
5204
5197
|
}], ctorParameters: function () { return [{ type: Router }, { type: ActivatedRoute }, { type: undefined, decorators: [{
|
|
@@ -5315,9 +5308,9 @@ class RouterLinkWithHref {
|
|
|
5315
5308
|
});
|
|
5316
5309
|
}
|
|
5317
5310
|
}
|
|
5318
|
-
RouterLinkWithHref.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.
|
|
5319
|
-
RouterLinkWithHref.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.0-next.
|
|
5320
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.
|
|
5311
|
+
RouterLinkWithHref.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.11", ngImport: i0, type: RouterLinkWithHref, deps: [{ token: Router }, { token: ActivatedRoute }, { token: i3.LocationStrategy }], target: i0.ɵɵFactoryTarget.Directive });
|
|
5312
|
+
RouterLinkWithHref.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.0-next.11", 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 });
|
|
5313
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.11", ngImport: i0, type: RouterLinkWithHref, decorators: [{
|
|
5321
5314
|
type: Directive,
|
|
5322
5315
|
args: [{ selector: 'a[routerLink],area[routerLink]' }]
|
|
5323
5316
|
}], ctorParameters: function () { return [{ type: Router }, { type: ActivatedRoute }, { type: i3.LocationStrategy }]; }, propDecorators: { target: [{
|
|
@@ -5529,9 +5522,9 @@ class RouterLinkActive {
|
|
|
5529
5522
|
this.links.some(isActiveCheckFn) || this.linksWithHrefs.some(isActiveCheckFn);
|
|
5530
5523
|
}
|
|
5531
5524
|
}
|
|
5532
|
-
RouterLinkActive.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.
|
|
5533
|
-
RouterLinkActive.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.0-next.
|
|
5534
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.
|
|
5525
|
+
RouterLinkActive.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.11", 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 });
|
|
5526
|
+
RouterLinkActive.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.0-next.11", 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 });
|
|
5527
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.11", ngImport: i0, type: RouterLinkActive, decorators: [{
|
|
5535
5528
|
type: Directive,
|
|
5536
5529
|
args: [{
|
|
5537
5530
|
selector: '[routerLinkActive]',
|
|
@@ -5674,9 +5667,9 @@ class RouterPreloader {
|
|
|
5674
5667
|
});
|
|
5675
5668
|
}
|
|
5676
5669
|
}
|
|
5677
|
-
RouterPreloader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.
|
|
5678
|
-
RouterPreloader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.0-next.
|
|
5679
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.
|
|
5670
|
+
RouterPreloader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.11", ngImport: i0, type: RouterPreloader, deps: [{ token: Router }, { token: i0.Compiler }, { token: i0.Injector }, { token: PreloadingStrategy }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5671
|
+
RouterPreloader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.0-next.11", ngImport: i0, type: RouterPreloader });
|
|
5672
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.11", ngImport: i0, type: RouterPreloader, decorators: [{
|
|
5680
5673
|
type: Injectable
|
|
5681
5674
|
}], ctorParameters: function () { return [{ type: Router }, { type: i0.Compiler }, { type: i0.Injector }, { type: PreloadingStrategy }]; } });
|
|
5682
5675
|
|
|
@@ -5762,9 +5755,9 @@ class RouterScroller {
|
|
|
5762
5755
|
}
|
|
5763
5756
|
}
|
|
5764
5757
|
}
|
|
5765
|
-
RouterScroller.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.
|
|
5766
|
-
RouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.0-next.
|
|
5767
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.
|
|
5758
|
+
RouterScroller.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.11", ngImport: i0, type: RouterScroller, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
|
|
5759
|
+
RouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.0-next.11", ngImport: i0, type: RouterScroller });
|
|
5760
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.11", ngImport: i0, type: RouterScroller, decorators: [{
|
|
5768
5761
|
type: Injectable
|
|
5769
5762
|
}], ctorParameters: function () { return [{ type: Router }, { type: i3.ViewportScroller }, { type: undefined }]; } });
|
|
5770
5763
|
|
|
@@ -5905,10 +5898,10 @@ class RouterModule {
|
|
|
5905
5898
|
return { ngModule: RouterModule, providers: [provideRoutes(routes)] };
|
|
5906
5899
|
}
|
|
5907
5900
|
}
|
|
5908
|
-
RouterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.
|
|
5909
|
-
RouterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.0-next.
|
|
5910
|
-
RouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.0-next.
|
|
5911
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.
|
|
5901
|
+
RouterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.11", ngImport: i0, type: RouterModule, deps: [{ token: ROUTER_FORROOT_GUARD, optional: true }, { token: Router, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
5902
|
+
RouterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.0-next.11", ngImport: i0, type: RouterModule, declarations: [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, ɵEmptyOutletComponent], exports: [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, ɵEmptyOutletComponent] });
|
|
5903
|
+
RouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.0-next.11", ngImport: i0, type: RouterModule });
|
|
5904
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.11", ngImport: i0, type: RouterModule, decorators: [{
|
|
5912
5905
|
type: NgModule,
|
|
5913
5906
|
args: [{
|
|
5914
5907
|
declarations: ROUTER_DIRECTIVES,
|
|
@@ -6084,9 +6077,9 @@ class RouterInitializer {
|
|
|
6084
6077
|
this.destroyed = true;
|
|
6085
6078
|
}
|
|
6086
6079
|
}
|
|
6087
|
-
RouterInitializer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.
|
|
6088
|
-
RouterInitializer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.0-next.
|
|
6089
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.
|
|
6080
|
+
RouterInitializer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.11", ngImport: i0, type: RouterInitializer, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6081
|
+
RouterInitializer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.0-next.11", ngImport: i0, type: RouterInitializer });
|
|
6082
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.11", ngImport: i0, type: RouterInitializer, decorators: [{
|
|
6090
6083
|
type: Injectable
|
|
6091
6084
|
}], ctorParameters: function () { return [{ type: i0.Injector }]; } });
|
|
6092
6085
|
function getAppInitializer(r) {
|
|
@@ -6126,7 +6119,7 @@ function provideRouterInitializer() {
|
|
|
6126
6119
|
/**
|
|
6127
6120
|
* @publicApi
|
|
6128
6121
|
*/
|
|
6129
|
-
const VERSION = new Version('13.0.0-next.
|
|
6122
|
+
const VERSION = new Version('13.0.0-next.11');
|
|
6130
6123
|
|
|
6131
6124
|
/**
|
|
6132
6125
|
* @license
|