@angular/router 14.0.0-next.15 → 14.0.0-next.16
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/events.mjs +57 -1
- package/esm2020/src/index.mjs +1 -1
- package/esm2020/src/models.mjs +1 -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 +12 -13
- 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/router_testing_module.mjs +4 -4
- package/fesm2015/router.mjs +99 -44
- package/fesm2015/router.mjs.map +1 -1
- package/fesm2015/testing.mjs +5 -5
- package/fesm2015/upgrade.mjs +1 -1
- package/fesm2020/router.mjs +98 -44
- package/fesm2020/router.mjs.map +1 -1
- package/fesm2020/testing.mjs +5 -5
- package/fesm2020/upgrade.mjs +1 -1
- package/index.d.ts +58 -8
- 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.0-next.
|
|
2
|
+
* @license Angular v14.0.0-next.16
|
|
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.0-next.
|
|
105
|
-
RouterTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
106
|
-
RouterTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
104
|
+
RouterTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.16", ngImport: i0, type: RouterTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
105
|
+
RouterTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.0-next.16", ngImport: i0, type: RouterTestingModule, exports: [RouterModule] });
|
|
106
|
+
RouterTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.0-next.16", 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.0-next.
|
|
131
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.16", 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.0-next.
|
|
2
|
+
* @license Angular v14.0.0-next.16
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -14,6 +14,7 @@ import { ElementRef } from '@angular/core';
|
|
|
14
14
|
import { EnvironmentInjector } from '@angular/core';
|
|
15
15
|
import { EventEmitter } from '@angular/core';
|
|
16
16
|
import * as i0 from '@angular/core';
|
|
17
|
+
import { ImportedNgModuleProviders } from '@angular/core';
|
|
17
18
|
import { InjectionToken } from '@angular/core';
|
|
18
19
|
import { Injector } from '@angular/core';
|
|
19
20
|
import { Location as Location_2 } from '@angular/common';
|
|
@@ -179,6 +180,7 @@ export declare class ActivatedRouteSnapshot {
|
|
|
179
180
|
export declare class ActivationEnd {
|
|
180
181
|
/** @docsNotRequired */
|
|
181
182
|
snapshot: ActivatedRouteSnapshot;
|
|
183
|
+
readonly type = EventType.ActivationEnd;
|
|
182
184
|
constructor(
|
|
183
185
|
/** @docsNotRequired */
|
|
184
186
|
snapshot: ActivatedRouteSnapshot);
|
|
@@ -196,6 +198,7 @@ export declare class ActivationEnd {
|
|
|
196
198
|
export declare class ActivationStart {
|
|
197
199
|
/** @docsNotRequired */
|
|
198
200
|
snapshot: ActivatedRouteSnapshot;
|
|
201
|
+
readonly type = EventType.ActivationStart;
|
|
199
202
|
constructor(
|
|
200
203
|
/** @docsNotRequired */
|
|
201
204
|
snapshot: ActivatedRouteSnapshot);
|
|
@@ -586,6 +589,7 @@ export declare interface CanLoad {
|
|
|
586
589
|
export declare class ChildActivationEnd {
|
|
587
590
|
/** @docsNotRequired */
|
|
588
591
|
snapshot: ActivatedRouteSnapshot;
|
|
592
|
+
readonly type = EventType.ChildActivationEnd;
|
|
589
593
|
constructor(
|
|
590
594
|
/** @docsNotRequired */
|
|
591
595
|
snapshot: ActivatedRouteSnapshot);
|
|
@@ -603,6 +607,7 @@ export declare class ChildActivationEnd {
|
|
|
603
607
|
export declare class ChildActivationStart {
|
|
604
608
|
/** @docsNotRequired */
|
|
605
609
|
snapshot: ActivatedRouteSnapshot;
|
|
610
|
+
readonly type = EventType.ChildActivationStart;
|
|
606
611
|
constructor(
|
|
607
612
|
/** @docsNotRequired */
|
|
608
613
|
snapshot: ActivatedRouteSnapshot);
|
|
@@ -752,9 +757,33 @@ declare type ErrorHandler = (error: any) => any;
|
|
|
752
757
|
*
|
|
753
758
|
* @publicApi
|
|
754
759
|
*/
|
|
755
|
-
declare type Event_2 = RouterEvent | RouteConfigLoadStart | RouteConfigLoadEnd | ChildActivationStart | ChildActivationEnd | ActivationStart | ActivationEnd | Scroll;
|
|
760
|
+
declare type Event_2 = RouterEvent | NavigationStart | NavigationEnd | NavigationCancel | NavigationError | RoutesRecognized | GuardsCheckStart | GuardsCheckEnd | RouteConfigLoadStart | RouteConfigLoadEnd | ChildActivationStart | ChildActivationEnd | ActivationStart | ActivationEnd | Scroll | ResolveStart | ResolveEnd;
|
|
756
761
|
export { Event_2 as Event }
|
|
757
762
|
|
|
763
|
+
/**
|
|
764
|
+
* Identifies the type of a router event.
|
|
765
|
+
*
|
|
766
|
+
* @publicApi
|
|
767
|
+
*/
|
|
768
|
+
export declare const enum EventType {
|
|
769
|
+
NavigationStart = 0,
|
|
770
|
+
NavigationEnd = 1,
|
|
771
|
+
NavigationCancel = 2,
|
|
772
|
+
NavigationError = 3,
|
|
773
|
+
RoutesRecognized = 4,
|
|
774
|
+
ResolveStart = 5,
|
|
775
|
+
ResolveEnd = 6,
|
|
776
|
+
GuardsCheckStart = 7,
|
|
777
|
+
GuardsCheckEnd = 8,
|
|
778
|
+
RouteConfigLoadStart = 9,
|
|
779
|
+
RouteConfigLoadEnd = 10,
|
|
780
|
+
ChildActivationStart = 11,
|
|
781
|
+
ChildActivationEnd = 12,
|
|
782
|
+
ActivationStart = 13,
|
|
783
|
+
ActivationEnd = 14,
|
|
784
|
+
Scroll = 15
|
|
785
|
+
}
|
|
786
|
+
|
|
758
787
|
/**
|
|
759
788
|
* A set of configuration options for a router module, provided in the
|
|
760
789
|
* `forRoot()` method.
|
|
@@ -965,6 +994,7 @@ export declare class GuardsCheckEnd extends RouterEvent {
|
|
|
965
994
|
state: RouterStateSnapshot;
|
|
966
995
|
/** @docsNotRequired */
|
|
967
996
|
shouldActivate: boolean;
|
|
997
|
+
readonly type = EventType.GuardsCheckEnd;
|
|
968
998
|
constructor(
|
|
969
999
|
/** @docsNotRequired */
|
|
970
1000
|
id: number,
|
|
@@ -991,6 +1021,7 @@ export declare class GuardsCheckStart extends RouterEvent {
|
|
|
991
1021
|
urlAfterRedirects: string;
|
|
992
1022
|
/** @docsNotRequired */
|
|
993
1023
|
state: RouterStateSnapshot;
|
|
1024
|
+
readonly type = EventType.GuardsCheckStart;
|
|
994
1025
|
constructor(
|
|
995
1026
|
/** @docsNotRequired */
|
|
996
1027
|
id: number,
|
|
@@ -1048,13 +1079,11 @@ declare namespace i4 {
|
|
|
1048
1079
|
* The following values have been [deprecated](guide/releases#deprecation-practices) since v11,
|
|
1049
1080
|
* and should not be used for new applications.
|
|
1050
1081
|
*
|
|
1051
|
-
* * 'enabled' - This option is 1:1 replaceable with `enabledBlocking`.
|
|
1052
|
-
*
|
|
1053
1082
|
* @see `forRoot()`
|
|
1054
1083
|
*
|
|
1055
1084
|
* @publicApi
|
|
1056
1085
|
*/
|
|
1057
|
-
export declare type InitialNavigation = 'disabled' | '
|
|
1086
|
+
export declare type InitialNavigation = 'disabled' | 'enabledBlocking' | 'enabledNonBlocking';
|
|
1058
1087
|
|
|
1059
1088
|
/**
|
|
1060
1089
|
* A set of options which specify how to determine if a `UrlTree` is active, given the `UrlTree`
|
|
@@ -1278,6 +1307,7 @@ export declare interface NavigationBehaviorOptions {
|
|
|
1278
1307
|
export declare class NavigationCancel extends RouterEvent {
|
|
1279
1308
|
/** @docsNotRequired */
|
|
1280
1309
|
reason: string;
|
|
1310
|
+
readonly type = EventType.NavigationCancel;
|
|
1281
1311
|
constructor(
|
|
1282
1312
|
/** @docsNotRequired */
|
|
1283
1313
|
id: number,
|
|
@@ -1301,6 +1331,7 @@ export declare class NavigationCancel extends RouterEvent {
|
|
|
1301
1331
|
export declare class NavigationEnd extends RouterEvent {
|
|
1302
1332
|
/** @docsNotRequired */
|
|
1303
1333
|
urlAfterRedirects: string;
|
|
1334
|
+
readonly type = EventType.NavigationEnd;
|
|
1304
1335
|
constructor(
|
|
1305
1336
|
/** @docsNotRequired */
|
|
1306
1337
|
id: number,
|
|
@@ -1324,6 +1355,7 @@ export declare class NavigationEnd extends RouterEvent {
|
|
|
1324
1355
|
export declare class NavigationError extends RouterEvent {
|
|
1325
1356
|
/** @docsNotRequired */
|
|
1326
1357
|
error: any;
|
|
1358
|
+
readonly type = EventType.NavigationError;
|
|
1327
1359
|
constructor(
|
|
1328
1360
|
/** @docsNotRequired */
|
|
1329
1361
|
id: number,
|
|
@@ -1360,6 +1392,7 @@ export declare interface NavigationExtras extends UrlCreationOptions, Navigation
|
|
|
1360
1392
|
* @publicApi
|
|
1361
1393
|
*/
|
|
1362
1394
|
export declare class NavigationStart extends RouterEvent {
|
|
1395
|
+
readonly type = EventType.NavigationStart;
|
|
1363
1396
|
/**
|
|
1364
1397
|
* Identifies the call or event that triggered the navigation.
|
|
1365
1398
|
* An `imperative` trigger is a call to `router.navigateByUrl()` or `router.navigate()`.
|
|
@@ -1368,7 +1401,7 @@ export declare class NavigationStart extends RouterEvent {
|
|
|
1368
1401
|
* @see `NavigationCancel`
|
|
1369
1402
|
* @see `NavigationError`
|
|
1370
1403
|
*/
|
|
1371
|
-
navigationTrigger?:
|
|
1404
|
+
navigationTrigger?: NavigationTrigger;
|
|
1372
1405
|
/**
|
|
1373
1406
|
* The navigation state that was previously supplied to the `pushState` call,
|
|
1374
1407
|
* when the navigation is triggered by a `popstate` event. Otherwise null.
|
|
@@ -1396,7 +1429,7 @@ export declare class NavigationStart extends RouterEvent {
|
|
|
1396
1429
|
/** @docsNotRequired */
|
|
1397
1430
|
url: string,
|
|
1398
1431
|
/** @docsNotRequired */
|
|
1399
|
-
navigationTrigger?:
|
|
1432
|
+
navigationTrigger?: NavigationTrigger,
|
|
1400
1433
|
/** @docsNotRequired */
|
|
1401
1434
|
restoredState?: {
|
|
1402
1435
|
[k: string]: any;
|
|
@@ -1406,6 +1439,17 @@ export declare class NavigationStart extends RouterEvent {
|
|
|
1406
1439
|
toString(): string;
|
|
1407
1440
|
}
|
|
1408
1441
|
|
|
1442
|
+
/**
|
|
1443
|
+
* Identifies the call or event that triggered a navigation.
|
|
1444
|
+
*
|
|
1445
|
+
* * 'imperative': Triggered by `router.navigateByUrl()` or `router.navigate()`.
|
|
1446
|
+
* * 'popstate' : Triggered by a `popstate` event.
|
|
1447
|
+
* * 'hashchange'-: Triggered by a `hashchange` event.
|
|
1448
|
+
*
|
|
1449
|
+
* @publicApi
|
|
1450
|
+
*/
|
|
1451
|
+
declare type NavigationTrigger = 'imperative' | 'popstate' | 'hashchange';
|
|
1452
|
+
|
|
1409
1453
|
/**
|
|
1410
1454
|
* @description
|
|
1411
1455
|
*
|
|
@@ -1697,6 +1741,7 @@ export declare class ResolveEnd extends RouterEvent {
|
|
|
1697
1741
|
urlAfterRedirects: string;
|
|
1698
1742
|
/** @docsNotRequired */
|
|
1699
1743
|
state: RouterStateSnapshot;
|
|
1744
|
+
readonly type = EventType.ResolveEnd;
|
|
1700
1745
|
constructor(
|
|
1701
1746
|
/** @docsNotRequired */
|
|
1702
1747
|
id: number,
|
|
@@ -1724,6 +1769,7 @@ export declare class ResolveStart extends RouterEvent {
|
|
|
1724
1769
|
urlAfterRedirects: string;
|
|
1725
1770
|
/** @docsNotRequired */
|
|
1726
1771
|
state: RouterStateSnapshot;
|
|
1772
|
+
readonly type = EventType.ResolveStart;
|
|
1727
1773
|
constructor(
|
|
1728
1774
|
/** @docsNotRequired */
|
|
1729
1775
|
id: number,
|
|
@@ -2083,7 +2129,7 @@ export declare interface Route {
|
|
|
2083
2129
|
* route also has a `loadChildren` function which returns an `NgModuleRef`, this injector will be
|
|
2084
2130
|
* used as the parent of the lazy loaded module.
|
|
2085
2131
|
*/
|
|
2086
|
-
providers?: Provider
|
|
2132
|
+
providers?: Array<Provider | ImportedNgModuleProviders>;
|
|
2087
2133
|
}
|
|
2088
2134
|
|
|
2089
2135
|
/**
|
|
@@ -2096,6 +2142,7 @@ export declare interface Route {
|
|
|
2096
2142
|
export declare class RouteConfigLoadEnd {
|
|
2097
2143
|
/** @docsNotRequired */
|
|
2098
2144
|
route: Route;
|
|
2145
|
+
readonly type = EventType.RouteConfigLoadEnd;
|
|
2099
2146
|
constructor(
|
|
2100
2147
|
/** @docsNotRequired */
|
|
2101
2148
|
route: Route);
|
|
@@ -2112,6 +2159,7 @@ export declare class RouteConfigLoadEnd {
|
|
|
2112
2159
|
export declare class RouteConfigLoadStart {
|
|
2113
2160
|
/** @docsNotRequired */
|
|
2114
2161
|
route: Route;
|
|
2162
|
+
readonly type = EventType.RouteConfigLoadStart;
|
|
2115
2163
|
constructor(
|
|
2116
2164
|
/** @docsNotRequired */
|
|
2117
2165
|
route: Route);
|
|
@@ -3371,6 +3419,7 @@ export declare class RoutesRecognized extends RouterEvent {
|
|
|
3371
3419
|
urlAfterRedirects: string;
|
|
3372
3420
|
/** @docsNotRequired */
|
|
3373
3421
|
state: RouterStateSnapshot;
|
|
3422
|
+
readonly type = EventType.RoutesRecognized;
|
|
3374
3423
|
constructor(
|
|
3375
3424
|
/** @docsNotRequired */
|
|
3376
3425
|
id: number,
|
|
@@ -3405,6 +3454,7 @@ export declare class Scroll {
|
|
|
3405
3454
|
readonly position: [number, number] | null;
|
|
3406
3455
|
/** @docsNotRequired */
|
|
3407
3456
|
readonly anchor: string | null;
|
|
3457
|
+
readonly type = EventType.Scroll;
|
|
3408
3458
|
constructor(
|
|
3409
3459
|
/** @docsNotRequired */
|
|
3410
3460
|
routerEvent: NavigationEnd,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/router",
|
|
3
|
-
"version": "14.0.0-next.
|
|
3
|
+
"version": "14.0.0-next.16",
|
|
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.0-next.
|
|
28
|
-
"@angular/common": "14.0.0-next.
|
|
29
|
-
"@angular/platform-browser": "14.0.0-next.
|
|
27
|
+
"@angular/core": "14.0.0-next.16",
|
|
28
|
+
"@angular/common": "14.0.0-next.16",
|
|
29
|
+
"@angular/platform-browser": "14.0.0-next.16",
|
|
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