@angular/router 15.0.1 → 15.0.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/esm2020/src/components/empty_outlet.mjs +3 -3
- package/esm2020/src/deprecated_load_children.mjs +3 -1
- package/esm2020/src/directives/router_link.mjs +3 -3
- package/esm2020/src/directives/router_link_active.mjs +3 -3
- package/esm2020/src/directives/router_outlet.mjs +3 -3
- package/esm2020/src/models.mjs +1 -1
- package/esm2020/src/navigation_transition.mjs +138 -78
- package/esm2020/src/page_title_strategy.mjs +6 -6
- package/esm2020/src/private_export.mjs +1 -1
- package/esm2020/src/provide_router.mjs +6 -3
- package/esm2020/src/route_reuse_strategy.mjs +6 -6
- package/esm2020/src/router.mjs +33 -83
- package/esm2020/src/router_config_loader.mjs +3 -3
- package/esm2020/src/router_module.mjs +9 -7
- package/esm2020/src/router_outlet_context.mjs +3 -3
- package/esm2020/src/router_preloader.mjs +9 -9
- package/esm2020/src/router_scroller.mjs +20 -21
- package/esm2020/src/router_state.mjs +1 -1
- package/esm2020/src/url_handling_strategy.mjs +6 -6
- package/esm2020/src/url_tree.mjs +4 -4
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/testing/src/router_testing_module.mjs +4 -4
- package/fesm2015/router.mjs +381 -369
- package/fesm2015/router.mjs.map +1 -1
- package/fesm2015/testing.mjs +5 -5
- package/fesm2015/upgrade.mjs +1 -1
- package/fesm2020/router.mjs +376 -368
- package/fesm2020/router.mjs.map +1 -1
- package/fesm2020/testing.mjs +5 -5
- package/fesm2020/upgrade.mjs +1 -1
- package/index.d.ts +15 -28
- package/package.json +4 -4
- package/testing/index.d.ts +1 -1
- package/upgrade/index.d.ts +1 -1
package/fesm2020/testing.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v15.0.
|
|
2
|
+
* @license Angular v15.0.2
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -101,9 +101,9 @@ class RouterTestingModule {
|
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
RouterTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
105
|
-
RouterTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.
|
|
106
|
-
RouterTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.
|
|
104
|
+
RouterTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: RouterTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
105
|
+
RouterTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: RouterTestingModule, exports: [RouterModule] });
|
|
106
|
+
RouterTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: RouterTestingModule, providers: [
|
|
107
107
|
ɵROUTER_PROVIDERS,
|
|
108
108
|
EXTRA_ROUTER_TESTING_PROVIDERS,
|
|
109
109
|
provideLocationMocks(),
|
|
@@ -126,7 +126,7 @@ RouterTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", ver
|
|
|
126
126
|
ɵwithPreloading(NoPreloading).ɵproviders,
|
|
127
127
|
{ provide: ROUTES, multi: true, useValue: [] },
|
|
128
128
|
], imports: [RouterModule] });
|
|
129
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
129
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: RouterTestingModule, decorators: [{
|
|
130
130
|
type: NgModule,
|
|
131
131
|
args: [{
|
|
132
132
|
exports: [RouterModule],
|
package/fesm2020/upgrade.mjs
CHANGED
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v15.0.
|
|
2
|
+
* @license Angular v15.0.2
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -1312,7 +1312,7 @@ export declare interface IsActiveMatchOptions {
|
|
|
1312
1312
|
* @see `LoadChildrenCallback`
|
|
1313
1313
|
* @publicApi
|
|
1314
1314
|
*/
|
|
1315
|
-
export declare type LoadChildren = LoadChildrenCallback
|
|
1315
|
+
export declare type LoadChildren = LoadChildrenCallback;
|
|
1316
1316
|
|
|
1317
1317
|
/**
|
|
1318
1318
|
*
|
|
@@ -2494,10 +2494,13 @@ export declare class RouteConfigLoadStart {
|
|
|
2494
2494
|
* @publicApi
|
|
2495
2495
|
*/
|
|
2496
2496
|
export declare class Router {
|
|
2497
|
+
private readonly urlSerializer;
|
|
2498
|
+
private readonly rootContexts;
|
|
2499
|
+
private readonly location;
|
|
2497
2500
|
config: Routes;
|
|
2498
|
-
private navigations;
|
|
2499
2501
|
private disposed;
|
|
2500
2502
|
private locationSubscription?;
|
|
2503
|
+
private get navigationId();
|
|
2501
2504
|
/**
|
|
2502
2505
|
* The id of the currently active page in the router.
|
|
2503
2506
|
* Updated to the transition's target id on a successful navigation.
|
|
@@ -2516,9 +2519,9 @@ export declare class Router {
|
|
|
2516
2519
|
private console;
|
|
2517
2520
|
private isNgZoneEnabled;
|
|
2518
2521
|
/**
|
|
2519
|
-
* An event stream for routing events
|
|
2522
|
+
* An event stream for routing events.
|
|
2520
2523
|
*/
|
|
2521
|
-
|
|
2524
|
+
get events(): Observable<Event_2>;
|
|
2522
2525
|
/**
|
|
2523
2526
|
* The current state of routing in this NgModule.
|
|
2524
2527
|
*/
|
|
@@ -2614,14 +2617,7 @@ export declare class Router {
|
|
|
2614
2617
|
*/
|
|
2615
2618
|
constructor(
|
|
2616
2619
|
/** @internal */
|
|
2617
|
-
rootComponentType: Type<any> | null,
|
|
2618
|
-
/** @internal */
|
|
2619
|
-
urlSerializer: UrlSerializer,
|
|
2620
|
-
/** @internal */
|
|
2621
|
-
rootContexts: ChildrenOutletContexts,
|
|
2622
|
-
/** @internal */
|
|
2623
|
-
location: Location_2, injector: Injector, compiler: Compiler, config: Routes);
|
|
2624
|
-
private setTransition;
|
|
2620
|
+
rootComponentType: Type<any> | null, urlSerializer: UrlSerializer, rootContexts: ChildrenOutletContexts, location: Location_2, injector: Injector, compiler: Compiler, config: Routes);
|
|
2625
2621
|
/**
|
|
2626
2622
|
* Sets up the location change listener and performs the initial navigation.
|
|
2627
2623
|
*/
|
|
@@ -2786,7 +2782,6 @@ export declare class Router {
|
|
|
2786
2782
|
*/
|
|
2787
2783
|
isActive(url: string | UrlTree, matchOptions: IsActiveMatchOptions): boolean;
|
|
2788
2784
|
private removeEmptyProps;
|
|
2789
|
-
private processNavigations;
|
|
2790
2785
|
private resetState;
|
|
2791
2786
|
private resetUrlToCurrentUrlTree;
|
|
2792
2787
|
private generateNgRouterState;
|
|
@@ -3870,7 +3865,7 @@ export declare interface UrlCreationOptions {
|
|
|
3870
3865
|
* constructor(private router: Router, private route: ActivatedRoute) {}
|
|
3871
3866
|
*
|
|
3872
3867
|
* go() {
|
|
3873
|
-
*
|
|
3868
|
+
* router.navigate(['../list'], { relativeTo: this.route });
|
|
3874
3869
|
* }
|
|
3875
3870
|
* }
|
|
3876
3871
|
* ```
|
|
@@ -3884,7 +3879,7 @@ export declare interface UrlCreationOptions {
|
|
|
3884
3879
|
*
|
|
3885
3880
|
* ```
|
|
3886
3881
|
* // Navigate to /results?page=1
|
|
3887
|
-
*
|
|
3882
|
+
* router.navigate(['/results'], { queryParams: { page: 1 } });
|
|
3888
3883
|
* ```
|
|
3889
3884
|
*/
|
|
3890
3885
|
queryParams?: Params | null;
|
|
@@ -3893,7 +3888,7 @@ export declare interface UrlCreationOptions {
|
|
|
3893
3888
|
*
|
|
3894
3889
|
* ```
|
|
3895
3890
|
* // Navigate to /results#top
|
|
3896
|
-
*
|
|
3891
|
+
* router.navigate(['/results'], { fragment: 'top' });
|
|
3897
3892
|
* ```
|
|
3898
3893
|
*/
|
|
3899
3894
|
fragment?: string;
|
|
@@ -3906,13 +3901,13 @@ export declare interface UrlCreationOptions {
|
|
|
3906
3901
|
* The "preserve" option discards any new query params:
|
|
3907
3902
|
* ```
|
|
3908
3903
|
* // from /view1?page=1 to/view2?page=1
|
|
3909
|
-
*
|
|
3904
|
+
* router.navigate(['/view2'], { queryParams: { page: 2 }, queryParamsHandling: "preserve"
|
|
3910
3905
|
* });
|
|
3911
3906
|
* ```
|
|
3912
3907
|
* The "merge" option appends new query params to the params from the current URL:
|
|
3913
3908
|
* ```
|
|
3914
3909
|
* // from /view1?page=1 to/view2?page=1&otherKey=2
|
|
3915
|
-
*
|
|
3910
|
+
* router.navigate(['/view2'], { queryParams: { otherKey: 2 }, queryParamsHandling: "merge"
|
|
3916
3911
|
* });
|
|
3917
3912
|
* ```
|
|
3918
3913
|
* In case of a key collision between current parameters and those in the `queryParams` object,
|
|
@@ -3925,7 +3920,7 @@ export declare interface UrlCreationOptions {
|
|
|
3925
3920
|
*
|
|
3926
3921
|
* ```
|
|
3927
3922
|
* // Preserve fragment from /results#top to /view#top
|
|
3928
|
-
*
|
|
3923
|
+
* router.navigate(['/view'], { preserveFragment: true });
|
|
3929
3924
|
* ```
|
|
3930
3925
|
*/
|
|
3931
3926
|
preserveFragment?: boolean;
|
|
@@ -4323,14 +4318,6 @@ export declare function withRouterConfig(options: RouterConfigOptions): RouterCo
|
|
|
4323
4318
|
|
|
4324
4319
|
export declare function ɵassignExtraOptionsToRouter(opts: ExtraOptions, router: Router): void;
|
|
4325
4320
|
|
|
4326
|
-
/**
|
|
4327
|
-
* Deprecated `loadChildren` value types.
|
|
4328
|
-
*
|
|
4329
|
-
* @publicApi
|
|
4330
|
-
* @deprecated represents the deprecated type side of `LoadChildren`.
|
|
4331
|
-
*/
|
|
4332
|
-
export declare type ɵDeprecatedLoadChildren = never;
|
|
4333
|
-
|
|
4334
4321
|
/**
|
|
4335
4322
|
* This component is used internally within the router to be a placeholder when an empty
|
|
4336
4323
|
* router-outlet is needed. For example, with a config such as:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/router",
|
|
3
|
-
"version": "15.0.
|
|
3
|
+
"version": "15.0.2",
|
|
4
4
|
"description": "Angular - the routing library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"tslib": "^2.3.0"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"@angular/core": "15.0.
|
|
28
|
-
"@angular/common": "15.0.
|
|
29
|
-
"@angular/platform-browser": "15.0.
|
|
27
|
+
"@angular/core": "15.0.2",
|
|
28
|
+
"@angular/common": "15.0.2",
|
|
29
|
+
"@angular/platform-browser": "15.0.2",
|
|
30
30
|
"rxjs": "^6.5.3 || ^7.4.0"
|
|
31
31
|
},
|
|
32
32
|
"ng-update": {
|
package/testing/index.d.ts
CHANGED
package/upgrade/index.d.ts
CHANGED