@angular/router 14.0.1 → 14.1.0-next.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/apply_redirects.mjs +3 -38
- package/esm2020/src/components/empty_outlet.mjs +3 -3
- package/esm2020/src/create_url_tree.mjs +127 -4
- 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/index.mjs +2 -1
- package/esm2020/src/page_title_strategy.mjs +3 -3
- package/esm2020/src/router.mjs +3 -3
- package/esm2020/src/router_config_loader.mjs +3 -3
- 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/url_tree.mjs +39 -1
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/testing/src/router_testing_module.mjs +4 -4
- package/fesm2015/router.mjs +1931 -1805
- package/fesm2015/router.mjs.map +1 -1
- package/fesm2015/testing.mjs +5 -5
- package/fesm2015/upgrade.mjs +1 -1
- package/fesm2020/router.mjs +1926 -1800
- package/fesm2020/router.mjs.map +1 -1
- package/fesm2020/testing.mjs +5 -5
- package/fesm2020/upgrade.mjs +1 -1
- package/index.d.ts +54 -1
- 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 v14.0.
|
|
2
|
+
* @license Angular v14.1.0-next.0
|
|
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: "14.0.
|
|
105
|
-
RouterTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.
|
|
106
|
-
RouterTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.
|
|
104
|
+
RouterTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0-next.0", ngImport: i0, type: RouterTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
105
|
+
RouterTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.0-next.0", ngImport: i0, type: RouterTestingModule, exports: [RouterModule] });
|
|
106
|
+
RouterTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.0-next.0", ngImport: i0, type: RouterTestingModule, providers: [
|
|
107
107
|
ɵROUTER_PROVIDERS,
|
|
108
108
|
EXTRA_ROUTER_TESTING_PROVIDERS,
|
|
109
109
|
{ provide: Location, useClass: SpyLocation },
|
|
@@ -128,7 +128,7 @@ RouterTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", ver
|
|
|
128
128
|
{ provide: PreloadingStrategy, useExisting: NoPreloading },
|
|
129
129
|
provideRoutes([]),
|
|
130
130
|
], imports: [RouterModule] });
|
|
131
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.
|
|
131
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0-next.0", ngImport: i0, type: RouterTestingModule, decorators: [{
|
|
132
132
|
type: NgModule,
|
|
133
133
|
args: [{
|
|
134
134
|
exports: [RouterModule],
|
package/fesm2020/upgrade.mjs
CHANGED
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v14.0.
|
|
2
|
+
* @license Angular v14.1.0-next.0
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -648,6 +648,59 @@ export declare class ChildrenOutletContexts {
|
|
|
648
648
|
*/
|
|
649
649
|
export declare function convertToParamMap(params: Params): ParamMap;
|
|
650
650
|
|
|
651
|
+
/**
|
|
652
|
+
* Creates a `UrlTree` relative to an `ActivatedRouteSnapshot`.
|
|
653
|
+
*
|
|
654
|
+
* @publicApi
|
|
655
|
+
*
|
|
656
|
+
*
|
|
657
|
+
* @param relativeTo The `ActivatedRouteSnapshot` to apply the commands to
|
|
658
|
+
* @param commands An array of URL fragments with which to construct the new URL tree.
|
|
659
|
+
* If the path is static, can be the literal URL string. For a dynamic path, pass an array of path
|
|
660
|
+
* segments, followed by the parameters for each segment.
|
|
661
|
+
* The fragments are applied to the one provided in the `relativeTo` parameter.
|
|
662
|
+
* @param queryParams The query parameters for the `UrlTree`. `null` if the `UrlTree` does not have
|
|
663
|
+
* any query parameters.
|
|
664
|
+
* @param fragment The fragment for the `UrlTree`. `null` if the `UrlTree` does not have a fragment.
|
|
665
|
+
*
|
|
666
|
+
* @usageNotes
|
|
667
|
+
*
|
|
668
|
+
* ```
|
|
669
|
+
* // create /team/33/user/11
|
|
670
|
+
* createUrlTreeFromSnapshot(snapshot, ['/team', 33, 'user', 11]);
|
|
671
|
+
*
|
|
672
|
+
* // create /team/33;expand=true/user/11
|
|
673
|
+
* createUrlTreeFromSnapshot(snapshot, ['/team', 33, {expand: true}, 'user', 11]);
|
|
674
|
+
*
|
|
675
|
+
* // you can collapse static segments like this (this works only with the first passed-in value):
|
|
676
|
+
* createUrlTreeFromSnapshot(snapshot, ['/team/33/user', userId]);
|
|
677
|
+
*
|
|
678
|
+
* // If the first segment can contain slashes, and you do not want the router to split it,
|
|
679
|
+
* // you can do the following:
|
|
680
|
+
* createUrlTreeFromSnapshot(snapshot, [{segmentPath: '/one/two'}]);
|
|
681
|
+
*
|
|
682
|
+
* // create /team/33/(user/11//right:chat)
|
|
683
|
+
* createUrlTreeFromSnapshot(snapshot, ['/team', 33, {outlets: {primary: 'user/11', right:
|
|
684
|
+
* 'chat'}}], null, null);
|
|
685
|
+
*
|
|
686
|
+
* // remove the right secondary node
|
|
687
|
+
* createUrlTreeFromSnapshot(snapshot, ['/team', 33, {outlets: {primary: 'user/11', right: null}}]);
|
|
688
|
+
*
|
|
689
|
+
* // For the examples below, assume the current URL is for the `/team/33/user/11` and the
|
|
690
|
+
* `ActivatedRouteSnapshot` points to `user/11`:
|
|
691
|
+
*
|
|
692
|
+
* // navigate to /team/33/user/11/details
|
|
693
|
+
* createUrlTreeFromSnapshot(snapshot, ['details']);
|
|
694
|
+
*
|
|
695
|
+
* // navigate to /team/33/user/22
|
|
696
|
+
* createUrlTreeFromSnapshot(snapshot, ['../22']);
|
|
697
|
+
*
|
|
698
|
+
* // navigate to /team/44/user/22
|
|
699
|
+
* createUrlTreeFromSnapshot(snapshot, ['../../team/44/user/22']);
|
|
700
|
+
* ```
|
|
701
|
+
*/
|
|
702
|
+
export declare function createUrlTreeFromSnapshot(relativeTo: ActivatedRouteSnapshot, commands: any[], queryParams?: Params | null, fragment?: string | null): UrlTree;
|
|
703
|
+
|
|
651
704
|
/**
|
|
652
705
|
*
|
|
653
706
|
* Represents static data associated with a particular route.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/router",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.1.0-next.0",
|
|
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": "14.0.
|
|
28
|
-
"@angular/common": "14.0.
|
|
29
|
-
"@angular/platform-browser": "14.0.
|
|
27
|
+
"@angular/core": "14.1.0-next.0",
|
|
28
|
+
"@angular/common": "14.1.0-next.0",
|
|
29
|
+
"@angular/platform-browser": "14.1.0-next.0",
|
|
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