@angular/router 14.1.0-next.3 → 14.1.0-next.4
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 +10 -5
- package/esm2020/src/components/empty_outlet.mjs +3 -3
- package/esm2020/src/create_url_tree.mjs +6 -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 +10 -9
- package/esm2020/src/errors.mjs +2 -0
- package/esm2020/src/events.mjs +13 -3
- package/esm2020/src/index.mjs +1 -1
- package/esm2020/src/models.mjs +1 -1
- package/esm2020/src/operators/check_guards.mjs +15 -47
- package/esm2020/src/page_title_strategy.mjs +3 -3
- package/esm2020/src/recognize.mjs +4 -3
- package/esm2020/src/router.mjs +22 -17
- package/esm2020/src/router_config_loader.mjs +3 -3
- package/esm2020/src/router_module.mjs +46 -12
- package/esm2020/src/router_preloader.mjs +9 -9
- package/esm2020/src/router_scroller.mjs +3 -3
- package/esm2020/src/shared.mjs +3 -2
- package/esm2020/src/url_tree.mjs +6 -4
- package/esm2020/src/utils/config.mjs +17 -17
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/testing/src/router_testing_module.mjs +4 -4
- package/fesm2015/router.mjs +161 -137
- package/fesm2015/router.mjs.map +1 -1
- package/fesm2015/testing.mjs +5 -5
- package/fesm2015/upgrade.mjs +1 -1
- package/fesm2020/router.mjs +161 -137
- package/fesm2020/router.mjs.map +1 -1
- package/fesm2020/testing.mjs +5 -5
- package/fesm2020/upgrade.mjs +1 -1
- package/index.d.ts +61 -5
- 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.1.0-next.
|
|
2
|
+
* @license Angular v14.1.0-next.4
|
|
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.1.0-next.
|
|
105
|
-
RouterTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.0-next.
|
|
106
|
-
RouterTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.0-next.
|
|
104
|
+
RouterTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0-next.4", ngImport: i0, type: RouterTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
105
|
+
RouterTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.0-next.4", ngImport: i0, type: RouterTestingModule, exports: [RouterModule] });
|
|
106
|
+
RouterTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.0-next.4", 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
|
ɵprovidePreloading(NoPreloading),
|
|
129
129
|
provideRoutes([]),
|
|
130
130
|
], imports: [RouterModule] });
|
|
131
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0-next.
|
|
131
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0-next.4", 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.1.0-next.
|
|
2
|
+
* @license Angular v14.1.0-next.4
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -1463,20 +1463,63 @@ export declare interface NavigationBehaviorOptions {
|
|
|
1463
1463
|
* @publicApi
|
|
1464
1464
|
*/
|
|
1465
1465
|
export declare class NavigationCancel extends RouterEvent {
|
|
1466
|
-
/**
|
|
1466
|
+
/**
|
|
1467
|
+
* A description of why the navigation was cancelled. For debug purposes only. Use `code`
|
|
1468
|
+
* instead for a stable cancellation reason that can be used in production.
|
|
1469
|
+
*/
|
|
1467
1470
|
reason: string;
|
|
1471
|
+
/**
|
|
1472
|
+
* A code to indicate why the navigation was canceled. This cancellation code is stable for
|
|
1473
|
+
* the reason and can be relied on whereas the `reason` string could change and should not be
|
|
1474
|
+
* used in production.
|
|
1475
|
+
*/
|
|
1476
|
+
readonly code?: NavigationCancellationCode | undefined;
|
|
1468
1477
|
readonly type = EventType.NavigationCancel;
|
|
1469
1478
|
constructor(
|
|
1470
1479
|
/** @docsNotRequired */
|
|
1471
1480
|
id: number,
|
|
1472
1481
|
/** @docsNotRequired */
|
|
1473
1482
|
url: string,
|
|
1474
|
-
/**
|
|
1475
|
-
|
|
1483
|
+
/**
|
|
1484
|
+
* A description of why the navigation was cancelled. For debug purposes only. Use `code`
|
|
1485
|
+
* instead for a stable cancellation reason that can be used in production.
|
|
1486
|
+
*/
|
|
1487
|
+
reason: string,
|
|
1488
|
+
/**
|
|
1489
|
+
* A code to indicate why the navigation was canceled. This cancellation code is stable for
|
|
1490
|
+
* the reason and can be relied on whereas the `reason` string could change and should not be
|
|
1491
|
+
* used in production.
|
|
1492
|
+
*/
|
|
1493
|
+
code?: NavigationCancellationCode | undefined);
|
|
1476
1494
|
/** @docsNotRequired */
|
|
1477
1495
|
toString(): string;
|
|
1478
1496
|
}
|
|
1479
1497
|
|
|
1498
|
+
/**
|
|
1499
|
+
* A code for the `NavigationCancel` event of the `Router` to indicate the
|
|
1500
|
+
* reason a navigation failed.
|
|
1501
|
+
*
|
|
1502
|
+
* @publicApi
|
|
1503
|
+
*/
|
|
1504
|
+
export declare const enum NavigationCancellationCode {
|
|
1505
|
+
/**
|
|
1506
|
+
* A navigation failed because a guard returned a `UrlTree` to redirect.
|
|
1507
|
+
*/
|
|
1508
|
+
Redirect = 0,
|
|
1509
|
+
/**
|
|
1510
|
+
* A navigation failed because a more recent navigation started.
|
|
1511
|
+
*/
|
|
1512
|
+
SupersededByNewNavigation = 1,
|
|
1513
|
+
/**
|
|
1514
|
+
* A navigation failed because one of the resolvers completed without emiting a value.
|
|
1515
|
+
*/
|
|
1516
|
+
NoDataFromResolver = 2,
|
|
1517
|
+
/**
|
|
1518
|
+
* A navigation failed because a guard returned `false`.
|
|
1519
|
+
*/
|
|
1520
|
+
GuardRejected = 3
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1480
1523
|
/**
|
|
1481
1524
|
* An event triggered when a navigation ends successfully.
|
|
1482
1525
|
*
|
|
@@ -2288,6 +2331,8 @@ export declare interface Route {
|
|
|
2288
2331
|
* - `always` : Run on every execution.
|
|
2289
2332
|
* By default, guards and resolvers run only when the matrix
|
|
2290
2333
|
* parameters of the route change.
|
|
2334
|
+
*
|
|
2335
|
+
* @see RunGuardsAndResolvers
|
|
2291
2336
|
*/
|
|
2292
2337
|
runGuardsAndResolvers?: RunGuardsAndResolvers;
|
|
2293
2338
|
/**
|
|
@@ -3603,9 +3648,20 @@ export declare class RoutesRecognized extends RouterEvent {
|
|
|
3603
3648
|
}
|
|
3604
3649
|
|
|
3605
3650
|
/**
|
|
3606
|
-
*
|
|
3607
3651
|
* A policy for when to run guards and resolvers on a route.
|
|
3608
3652
|
*
|
|
3653
|
+
* Guards and/or resolvers will always run when a route is activated or deactivated. When a route is
|
|
3654
|
+
* unchanged, the default behavior is the same as `paramsChange`.
|
|
3655
|
+
*
|
|
3656
|
+
* `paramsChange` : Rerun the guards and resolvers when path or
|
|
3657
|
+
* path param changes. This does not include query parameters. This option is the default.
|
|
3658
|
+
* - `always` : Run on every execution.
|
|
3659
|
+
* - `pathParamsChange` : Rerun guards and resolvers when the path params
|
|
3660
|
+
* change. This does not compare matrix or query parameters.
|
|
3661
|
+
* - `paramsOrQueryParamsChange` : Run when path, matrix, or query parameters change.
|
|
3662
|
+
* - `pathParamsOrQueryParamsChange` : Rerun guards and resolvers when the path params
|
|
3663
|
+
* change or query params have changed. This does not include matrix parameters.
|
|
3664
|
+
*
|
|
3609
3665
|
* @see [Route.runGuardsAndResolvers](api/router/Route#runGuardsAndResolvers)
|
|
3610
3666
|
* @publicApi
|
|
3611
3667
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/router",
|
|
3
|
-
"version": "14.1.0-next.
|
|
3
|
+
"version": "14.1.0-next.4",
|
|
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.1.0-next.
|
|
28
|
-
"@angular/common": "14.1.0-next.
|
|
29
|
-
"@angular/platform-browser": "14.1.0-next.
|
|
27
|
+
"@angular/core": "14.1.0-next.4",
|
|
28
|
+
"@angular/common": "14.1.0-next.4",
|
|
29
|
+
"@angular/platform-browser": "14.1.0-next.4",
|
|
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