@angular/router 16.0.0-rc.0 → 16.0.0-rc.2
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/esm2022/src/components/empty_outlet.mjs +3 -3
- package/esm2022/src/directives/router_link.mjs +3 -3
- package/esm2022/src/directives/router_link_active.mjs +3 -3
- package/esm2022/src/directives/router_outlet.mjs +6 -6
- package/esm2022/src/navigation_transition.mjs +4 -5
- package/esm2022/src/page_title_strategy.mjs +6 -6
- package/esm2022/src/route_reuse_strategy.mjs +6 -6
- package/esm2022/src/router.mjs +21 -42
- package/esm2022/src/router_config_loader.mjs +3 -3
- package/esm2022/src/router_module.mjs +5 -5
- package/esm2022/src/router_outlet_context.mjs +3 -3
- package/esm2022/src/router_preloader.mjs +9 -9
- package/esm2022/src/router_scroller.mjs +3 -3
- package/esm2022/src/url_handling_strategy.mjs +6 -6
- package/esm2022/src/url_tree.mjs +3 -3
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/router_testing_harness.mjs +6 -6
- package/esm2022/testing/src/router_testing_module.mjs +4 -4
- package/fesm2022/router.mjs +83 -105
- package/fesm2022/router.mjs.map +1 -1
- package/fesm2022/testing.mjs +11 -11
- package/fesm2022/upgrade.mjs +1 -1
- package/index.d.ts +1 -1
- package/package.json +4 -4
- package/testing/index.d.ts +1 -1
- package/upgrade/index.d.ts +1 -1
package/fesm2022/router.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v16.0.0-rc.
|
|
2
|
+
* @license Angular v16.0.0-rc.2
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -419,10 +419,10 @@ function mapChildrenIntoArray(segment, fn) {
|
|
|
419
419
|
* @publicApi
|
|
420
420
|
*/
|
|
421
421
|
class UrlSerializer {
|
|
422
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
423
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
422
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: UrlSerializer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
423
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: UrlSerializer, providedIn: 'root', useFactory: () => new DefaultUrlSerializer() }); }
|
|
424
424
|
}
|
|
425
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
425
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: UrlSerializer, decorators: [{
|
|
426
426
|
type: Injectable,
|
|
427
427
|
args: [{ providedIn: 'root', useFactory: () => new DefaultUrlSerializer() }]
|
|
428
428
|
}] });
|
|
@@ -1772,10 +1772,10 @@ class ChildrenOutletContexts {
|
|
|
1772
1772
|
getContext(childName) {
|
|
1773
1773
|
return this.contexts.get(childName) || null;
|
|
1774
1774
|
}
|
|
1775
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
1776
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
1775
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: ChildrenOutletContexts, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1776
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: ChildrenOutletContexts, providedIn: 'root' }); }
|
|
1777
1777
|
}
|
|
1778
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
1778
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: ChildrenOutletContexts, decorators: [{
|
|
1779
1779
|
type: Injectable,
|
|
1780
1780
|
args: [{ providedIn: 'root' }]
|
|
1781
1781
|
}] });
|
|
@@ -2482,10 +2482,10 @@ class RouterOutlet {
|
|
|
2482
2482
|
this.inputBinder?.bindActivatedRouteToOutletComponent(this);
|
|
2483
2483
|
this.activateEvents.emit(this.activated.instance);
|
|
2484
2484
|
}
|
|
2485
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
2486
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-rc.
|
|
2485
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: RouterOutlet, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2486
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-rc.2", 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 }); }
|
|
2487
2487
|
}
|
|
2488
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
2488
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: RouterOutlet, decorators: [{
|
|
2489
2489
|
type: Directive,
|
|
2490
2490
|
args: [{
|
|
2491
2491
|
selector: 'router-outlet',
|
|
@@ -2588,10 +2588,10 @@ class RoutedComponentInputBinder {
|
|
|
2588
2588
|
});
|
|
2589
2589
|
this.outletDataSubscriptions.set(outlet, dataSubscription);
|
|
2590
2590
|
}
|
|
2591
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
2592
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
2591
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: RoutedComponentInputBinder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2592
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: RoutedComponentInputBinder }); }
|
|
2593
2593
|
}
|
|
2594
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
2594
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: RoutedComponentInputBinder, decorators: [{
|
|
2595
2595
|
type: Injectable
|
|
2596
2596
|
}] });
|
|
2597
2597
|
|
|
@@ -2671,10 +2671,10 @@ function isNavigationCancelingError$1(error) {
|
|
|
2671
2671
|
* to this `EmptyOutletComponent`.
|
|
2672
2672
|
*/
|
|
2673
2673
|
class ɵEmptyOutletComponent {
|
|
2674
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
2675
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0-rc.
|
|
2674
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: ɵEmptyOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2675
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0-rc.2", 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"] }] }); }
|
|
2676
2676
|
}
|
|
2677
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
2677
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: ɵEmptyOutletComponent, decorators: [{
|
|
2678
2678
|
type: Component,
|
|
2679
2679
|
args: [{
|
|
2680
2680
|
template: `<router-outlet></router-outlet>`,
|
|
@@ -4148,10 +4148,10 @@ class RouterConfigLoader {
|
|
|
4148
4148
|
}
|
|
4149
4149
|
}));
|
|
4150
4150
|
}
|
|
4151
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
4152
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
4151
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: RouterConfigLoader, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4152
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: RouterConfigLoader, providedIn: 'root' }); }
|
|
4153
4153
|
}
|
|
4154
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
4154
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: RouterConfigLoader, decorators: [{
|
|
4155
4155
|
type: Injectable,
|
|
4156
4156
|
args: [{ providedIn: 'root' }]
|
|
4157
4157
|
}] });
|
|
@@ -4205,7 +4205,6 @@ class NavigationTransitions {
|
|
|
4205
4205
|
setupNavigations(router) {
|
|
4206
4206
|
this.transitions = new BehaviorSubject({
|
|
4207
4207
|
id: 0,
|
|
4208
|
-
targetPageId: 0,
|
|
4209
4208
|
currentUrlTree: router.currentUrlTree,
|
|
4210
4209
|
currentRawUrl: router.currentUrlTree,
|
|
4211
4210
|
extractedUrl: router.urlHandlingStrategy.extract(router.currentUrlTree),
|
|
@@ -4527,10 +4526,10 @@ class NavigationTransitions {
|
|
|
4527
4526
|
this.events.next(navCancel);
|
|
4528
4527
|
t.resolve(false);
|
|
4529
4528
|
}
|
|
4530
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
4531
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
4529
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: NavigationTransitions, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4530
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: NavigationTransitions, providedIn: 'root' }); }
|
|
4532
4531
|
}
|
|
4533
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
4532
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: NavigationTransitions, decorators: [{
|
|
4534
4533
|
type: Injectable,
|
|
4535
4534
|
args: [{ providedIn: 'root' }]
|
|
4536
4535
|
}], ctorParameters: function () { return []; } });
|
|
@@ -4581,10 +4580,10 @@ class TitleStrategy {
|
|
|
4581
4580
|
getResolvedTitleForRoute(snapshot) {
|
|
4582
4581
|
return snapshot.data[RouteTitleKey];
|
|
4583
4582
|
}
|
|
4584
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
4585
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
4583
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: TitleStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4584
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: TitleStrategy, providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) }); }
|
|
4586
4585
|
}
|
|
4587
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
4586
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: TitleStrategy, decorators: [{
|
|
4588
4587
|
type: Injectable,
|
|
4589
4588
|
args: [{ providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) }]
|
|
4590
4589
|
}] });
|
|
@@ -4607,10 +4606,10 @@ class DefaultTitleStrategy extends TitleStrategy {
|
|
|
4607
4606
|
this.title.setTitle(title);
|
|
4608
4607
|
}
|
|
4609
4608
|
}
|
|
4610
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
4611
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
4609
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: DefaultTitleStrategy, deps: [{ token: i1.Title }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4610
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: DefaultTitleStrategy, providedIn: 'root' }); }
|
|
4612
4611
|
}
|
|
4613
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
4612
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: DefaultTitleStrategy, decorators: [{
|
|
4614
4613
|
type: Injectable,
|
|
4615
4614
|
args: [{ providedIn: 'root' }]
|
|
4616
4615
|
}], ctorParameters: function () { return [{ type: i1.Title }]; } });
|
|
@@ -4623,10 +4622,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.0", ng
|
|
|
4623
4622
|
* @publicApi
|
|
4624
4623
|
*/
|
|
4625
4624
|
class RouteReuseStrategy {
|
|
4626
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
4627
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
4625
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: RouteReuseStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4626
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: RouteReuseStrategy, providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) }); }
|
|
4628
4627
|
}
|
|
4629
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
4628
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: RouteReuseStrategy, decorators: [{
|
|
4630
4629
|
type: Injectable,
|
|
4631
4630
|
args: [{ providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) }]
|
|
4632
4631
|
}] });
|
|
@@ -4677,10 +4676,10 @@ class BaseRouteReuseStrategy {
|
|
|
4677
4676
|
}
|
|
4678
4677
|
}
|
|
4679
4678
|
class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {
|
|
4680
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
4681
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
4679
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: DefaultRouteReuseStrategy, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4680
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: DefaultRouteReuseStrategy, providedIn: 'root' }); }
|
|
4682
4681
|
}
|
|
4683
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
4682
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: DefaultRouteReuseStrategy, decorators: [{
|
|
4684
4683
|
type: Injectable,
|
|
4685
4684
|
args: [{ providedIn: 'root' }]
|
|
4686
4685
|
}] });
|
|
@@ -4703,10 +4702,10 @@ const ROUTER_CONFIGURATION = new InjectionToken((typeof ngDevMode === 'undefined
|
|
|
4703
4702
|
* @publicApi
|
|
4704
4703
|
*/
|
|
4705
4704
|
class UrlHandlingStrategy {
|
|
4706
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
4707
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
4705
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: UrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4706
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: UrlHandlingStrategy, providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) }); }
|
|
4708
4707
|
}
|
|
4709
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
4708
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: UrlHandlingStrategy, decorators: [{
|
|
4710
4709
|
type: Injectable,
|
|
4711
4710
|
args: [{ providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) }]
|
|
4712
4711
|
}] });
|
|
@@ -4723,10 +4722,10 @@ class DefaultUrlHandlingStrategy {
|
|
|
4723
4722
|
merge(newUrlPart, wholeUrl) {
|
|
4724
4723
|
return newUrlPart;
|
|
4725
4724
|
}
|
|
4726
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
4727
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
4725
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: DefaultUrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4726
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: DefaultUrlHandlingStrategy, providedIn: 'root' }); }
|
|
4728
4727
|
}
|
|
4729
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
4728
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: DefaultUrlHandlingStrategy, decorators: [{
|
|
4730
4729
|
type: Injectable,
|
|
4731
4730
|
args: [{ providedIn: 'root' }]
|
|
4732
4731
|
}] });
|
|
@@ -4814,6 +4813,9 @@ class Router {
|
|
|
4814
4813
|
* page id in the browser history is 1 more than the previous entry.
|
|
4815
4814
|
*/
|
|
4816
4815
|
get browserPageId() {
|
|
4816
|
+
if (this.canceledNavigationResolution !== 'computed') {
|
|
4817
|
+
return undefined;
|
|
4818
|
+
}
|
|
4817
4819
|
return this.location.getState()?.ɵrouterPageId;
|
|
4818
4820
|
}
|
|
4819
4821
|
/**
|
|
@@ -4972,7 +4974,7 @@ class Router {
|
|
|
4972
4974
|
this.routerState = createEmptyState(this.currentUrlTree, null);
|
|
4973
4975
|
this.navigationTransitions.setupNavigations(this).subscribe(t => {
|
|
4974
4976
|
this.lastSuccessfulId = t.id;
|
|
4975
|
-
this.currentPageId =
|
|
4977
|
+
this.currentPageId = this.browserPageId ?? 0;
|
|
4976
4978
|
}, e => {
|
|
4977
4979
|
this.console.warn(`Unhandled Navigation Error: ${e}`);
|
|
4978
4980
|
});
|
|
@@ -5319,29 +5321,6 @@ class Router {
|
|
|
5319
5321
|
reject = rej;
|
|
5320
5322
|
});
|
|
5321
5323
|
}
|
|
5322
|
-
let targetPageId;
|
|
5323
|
-
if (this.canceledNavigationResolution === 'computed') {
|
|
5324
|
-
// If the `ɵrouterPageId` exist in the state then `targetpageId` should have the value of
|
|
5325
|
-
// `ɵrouterPageId`. This is the case for something like a page refresh where we assign the
|
|
5326
|
-
// target id to the previously set value for that page.
|
|
5327
|
-
if (restoredState && restoredState.ɵrouterPageId) {
|
|
5328
|
-
targetPageId = restoredState.ɵrouterPageId;
|
|
5329
|
-
}
|
|
5330
|
-
else {
|
|
5331
|
-
// If we're replacing the URL or doing a silent navigation, we do not want to increment the
|
|
5332
|
-
// page id because we aren't pushing a new entry to history.
|
|
5333
|
-
if (extras.replaceUrl || extras.skipLocationChange) {
|
|
5334
|
-
targetPageId = this.browserPageId ?? 0;
|
|
5335
|
-
}
|
|
5336
|
-
else {
|
|
5337
|
-
targetPageId = (this.browserPageId ?? 0) + 1;
|
|
5338
|
-
}
|
|
5339
|
-
}
|
|
5340
|
-
}
|
|
5341
|
-
else {
|
|
5342
|
-
// This is unused when `canceledNavigationResolution` is not computed.
|
|
5343
|
-
targetPageId = 0;
|
|
5344
|
-
}
|
|
5345
5324
|
// Indicate that the navigation is happening.
|
|
5346
5325
|
const taskId = this.pendingTasks.add();
|
|
5347
5326
|
afterNextNavigation(this, () => {
|
|
@@ -5350,7 +5329,6 @@ class Router {
|
|
|
5350
5329
|
Promise.resolve().then(() => this.pendingTasks.remove(taskId));
|
|
5351
5330
|
});
|
|
5352
5331
|
this.navigationTransitions.handleNavigationRequest({
|
|
5353
|
-
targetPageId,
|
|
5354
5332
|
source,
|
|
5355
5333
|
restoredState,
|
|
5356
5334
|
currentUrlTree: this.currentUrlTree,
|
|
@@ -5372,14 +5350,20 @@ class Router {
|
|
|
5372
5350
|
/** @internal */
|
|
5373
5351
|
setBrowserUrl(url, transition) {
|
|
5374
5352
|
const path = this.urlSerializer.serialize(url);
|
|
5375
|
-
const state = {
|
|
5376
|
-
...transition.extras.state,
|
|
5377
|
-
...this.generateNgRouterState(transition.id, transition.targetPageId)
|
|
5378
|
-
};
|
|
5379
5353
|
if (this.location.isCurrentPathEqualTo(path) || !!transition.extras.replaceUrl) {
|
|
5354
|
+
// replacements do not update the target page
|
|
5355
|
+
const currentBrowserPageId = this.browserPageId;
|
|
5356
|
+
const state = {
|
|
5357
|
+
...transition.extras.state,
|
|
5358
|
+
...this.generateNgRouterState(transition.id, currentBrowserPageId)
|
|
5359
|
+
};
|
|
5380
5360
|
this.location.replaceState(path, '', state);
|
|
5381
5361
|
}
|
|
5382
5362
|
else {
|
|
5363
|
+
const state = {
|
|
5364
|
+
...transition.extras.state,
|
|
5365
|
+
...this.generateNgRouterState(transition.id, (this.browserPageId ?? 0) + 1)
|
|
5366
|
+
};
|
|
5383
5367
|
this.location.go(path, '', state);
|
|
5384
5368
|
}
|
|
5385
5369
|
}
|
|
@@ -5390,15 +5374,9 @@ class Router {
|
|
|
5390
5374
|
*/
|
|
5391
5375
|
restoreHistory(transition, restoringFromCaughtError = false) {
|
|
5392
5376
|
if (this.canceledNavigationResolution === 'computed') {
|
|
5393
|
-
const
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
// Also, when navigation gets cancelled while using url update strategy eager, then we need to
|
|
5397
|
-
// go back. Because, when `urlUpdateStrategy` is `eager`; `setBrowserUrl` method is called
|
|
5398
|
-
// before any verification.
|
|
5399
|
-
const browserUrlUpdateOccurred = (transition.source === 'popstate' || this.urlUpdateStrategy === 'eager' ||
|
|
5400
|
-
this.currentUrlTree === this.getCurrentNavigation()?.finalUrl);
|
|
5401
|
-
if (browserUrlUpdateOccurred && targetPagePosition !== 0) {
|
|
5377
|
+
const currentBrowserPageId = this.browserPageId ?? this.currentPageId;
|
|
5378
|
+
const targetPagePosition = this.currentPageId - currentBrowserPageId;
|
|
5379
|
+
if (targetPagePosition !== 0) {
|
|
5402
5380
|
this.location.historyGo(targetPagePosition);
|
|
5403
5381
|
}
|
|
5404
5382
|
else if (this.currentUrlTree === this.getCurrentNavigation()?.finalUrl &&
|
|
@@ -5447,10 +5425,10 @@ class Router {
|
|
|
5447
5425
|
}
|
|
5448
5426
|
return { navigationId };
|
|
5449
5427
|
}
|
|
5450
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
5451
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
5428
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: Router, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5429
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: Router, providedIn: 'root' }); }
|
|
5452
5430
|
}
|
|
5453
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
5431
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: Router, decorators: [{
|
|
5454
5432
|
type: Injectable,
|
|
5455
5433
|
args: [{ providedIn: 'root' }]
|
|
5456
5434
|
}], ctorParameters: function () { return []; } });
|
|
@@ -5736,10 +5714,10 @@ class RouterLink {
|
|
|
5736
5714
|
preserveFragment: this.preserveFragment,
|
|
5737
5715
|
});
|
|
5738
5716
|
}
|
|
5739
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
5740
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-rc.
|
|
5717
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.2", 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 }); }
|
|
5718
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-rc.2", 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 }); }
|
|
5741
5719
|
}
|
|
5742
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
5720
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: RouterLink, decorators: [{
|
|
5743
5721
|
type: Directive,
|
|
5744
5722
|
args: [{
|
|
5745
5723
|
selector: '[routerLink]',
|
|
@@ -5959,10 +5937,10 @@ class RouterLinkActive {
|
|
|
5959
5937
|
const isActiveCheckFn = this.isLinkActive(this.router);
|
|
5960
5938
|
return this.link && isActiveCheckFn(this.link) || this.links.some(isActiveCheckFn);
|
|
5961
5939
|
}
|
|
5962
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
5963
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-rc.
|
|
5940
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: RouterLinkActive, deps: [{ token: Router }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: RouterLink, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5941
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-rc.2", 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 }); }
|
|
5964
5942
|
}
|
|
5965
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
5943
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: RouterLinkActive, decorators: [{
|
|
5966
5944
|
type: Directive,
|
|
5967
5945
|
args: [{
|
|
5968
5946
|
selector: '[routerLinkActive]',
|
|
@@ -6014,10 +5992,10 @@ class PreloadAllModules {
|
|
|
6014
5992
|
preload(route, fn) {
|
|
6015
5993
|
return fn().pipe(catchError(() => of(null)));
|
|
6016
5994
|
}
|
|
6017
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
6018
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
5995
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: PreloadAllModules, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5996
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: PreloadAllModules, providedIn: 'root' }); }
|
|
6019
5997
|
}
|
|
6020
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
5998
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: PreloadAllModules, decorators: [{
|
|
6021
5999
|
type: Injectable,
|
|
6022
6000
|
args: [{ providedIn: 'root' }]
|
|
6023
6001
|
}] });
|
|
@@ -6034,10 +6012,10 @@ class NoPreloading {
|
|
|
6034
6012
|
preload(route, fn) {
|
|
6035
6013
|
return of(null);
|
|
6036
6014
|
}
|
|
6037
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
6038
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
6015
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: NoPreloading, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
6016
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: NoPreloading, providedIn: 'root' }); }
|
|
6039
6017
|
}
|
|
6040
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
6018
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: NoPreloading, decorators: [{
|
|
6041
6019
|
type: Injectable,
|
|
6042
6020
|
args: [{ providedIn: 'root' }]
|
|
6043
6021
|
}] });
|
|
@@ -6130,10 +6108,10 @@ class RouterPreloader {
|
|
|
6130
6108
|
}
|
|
6131
6109
|
});
|
|
6132
6110
|
}
|
|
6133
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
6134
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
6111
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: RouterPreloader, deps: [{ token: Router }, { token: i0.Compiler }, { token: i0.EnvironmentInjector }, { token: PreloadingStrategy }, { token: RouterConfigLoader }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
6112
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: RouterPreloader, providedIn: 'root' }); }
|
|
6135
6113
|
}
|
|
6136
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
6114
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: RouterPreloader, decorators: [{
|
|
6137
6115
|
type: Injectable,
|
|
6138
6116
|
args: [{ providedIn: 'root' }]
|
|
6139
6117
|
}], ctorParameters: function () { return [{ type: Router }, { type: i0.Compiler }, { type: i0.EnvironmentInjector }, { type: PreloadingStrategy }, { type: RouterConfigLoader }]; } });
|
|
@@ -6226,10 +6204,10 @@ class RouterScroller {
|
|
|
6226
6204
|
this.routerEventsSubscription?.unsubscribe();
|
|
6227
6205
|
this.scrollEventsSubscription?.unsubscribe();
|
|
6228
6206
|
}
|
|
6229
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
6230
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
6207
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: RouterScroller, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
6208
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: RouterScroller }); }
|
|
6231
6209
|
}
|
|
6232
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
6210
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: RouterScroller, decorators: [{
|
|
6233
6211
|
type: Injectable
|
|
6234
6212
|
}], ctorParameters: function () { return [{ type: UrlSerializer }, { type: NavigationTransitions }, { type: i3.ViewportScroller }, { type: i0.NgZone }, { type: undefined }]; } });
|
|
6235
6213
|
|
|
@@ -6835,11 +6813,11 @@ class RouterModule {
|
|
|
6835
6813
|
providers: [{ provide: ROUTES, multi: true, useValue: routes }],
|
|
6836
6814
|
};
|
|
6837
6815
|
}
|
|
6838
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
6839
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-rc.
|
|
6840
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
6816
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: RouterModule, deps: [{ token: ROUTER_FORROOT_GUARD, optional: true }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
6817
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-rc.2", ngImport: i0, type: RouterModule, imports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent], exports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent] }); }
|
|
6818
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: RouterModule }); }
|
|
6841
6819
|
}
|
|
6842
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.
|
|
6820
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.2", ngImport: i0, type: RouterModule, decorators: [{
|
|
6843
6821
|
type: NgModule,
|
|
6844
6822
|
args: [{
|
|
6845
6823
|
imports: ROUTER_DIRECTIVES,
|
|
@@ -6984,7 +6962,7 @@ function mapToResolve(provider) {
|
|
|
6984
6962
|
/**
|
|
6985
6963
|
* @publicApi
|
|
6986
6964
|
*/
|
|
6987
|
-
const VERSION = new Version('16.0.0-rc.
|
|
6965
|
+
const VERSION = new Version('16.0.0-rc.2');
|
|
6988
6966
|
|
|
6989
6967
|
/**
|
|
6990
6968
|
* @module
|