@angular/router 14.1.0 → 14.2.0-next.1

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.
Files changed (38) hide show
  1. package/esm2020/src/apply_redirects.mjs +4 -3
  2. package/esm2020/src/components/empty_outlet.mjs +10 -6
  3. package/esm2020/src/directives/router_link.mjs +12 -9
  4. package/esm2020/src/directives/router_link_active.mjs +5 -4
  5. package/esm2020/src/directives/router_outlet.mjs +9 -5
  6. package/esm2020/src/index.mjs +4 -3
  7. package/esm2020/src/models.mjs +1 -1
  8. package/esm2020/src/operators/check_guards.mjs +36 -26
  9. package/esm2020/src/operators/resolve_data.mjs +22 -23
  10. package/esm2020/src/page_title_strategy.mjs +9 -10
  11. package/esm2020/src/private_export.mjs +3 -2
  12. package/esm2020/src/recognize.mjs +4 -3
  13. package/esm2020/src/router.mjs +62 -9
  14. package/esm2020/src/router_config.mjs +19 -0
  15. package/esm2020/src/router_config_loader.mjs +6 -5
  16. package/esm2020/src/router_module.mjs +22 -79
  17. package/esm2020/src/router_outlet_context.mjs +9 -1
  18. package/esm2020/src/router_preloader.mjs +19 -11
  19. package/esm2020/src/router_scroller.mjs +3 -3
  20. package/esm2020/src/router_state.mjs +7 -3
  21. package/esm2020/src/shared.mjs +22 -2
  22. package/esm2020/src/url_tree.mjs +9 -2
  23. package/esm2020/src/utils/preactivation.mjs +16 -6
  24. package/esm2020/src/utils/type_guards.mjs +5 -1
  25. package/esm2020/src/version.mjs +1 -1
  26. package/esm2020/testing/src/router_testing_module.mjs +4 -4
  27. package/fesm2015/router.mjs +381 -277
  28. package/fesm2015/router.mjs.map +1 -1
  29. package/fesm2015/testing.mjs +5 -5
  30. package/fesm2015/upgrade.mjs +1 -1
  31. package/fesm2020/router.mjs +365 -275
  32. package/fesm2020/router.mjs.map +1 -1
  33. package/fesm2020/testing.mjs +5 -5
  34. package/fesm2020/upgrade.mjs +1 -1
  35. package/index.d.ts +119 -77
  36. package/package.json +4 -4
  37. package/testing/index.d.ts +1 -1
  38. package/upgrade/index.d.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v14.1.0
2
+ * @license Angular v14.2.0-next.1
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", ngImport: i0, type: RouterTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
105
- RouterTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.0", ngImport: i0, type: RouterTestingModule, exports: [RouterModule] });
106
- RouterTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterTestingModule, providers: [
104
+ RouterTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: RouterTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
105
+ RouterTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0-next.1", ngImport: i0, type: RouterTestingModule, exports: [RouterModule] });
106
+ RouterTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: RouterTestingModule, providers: [
107
107
  ɵROUTER_PROVIDERS,
108
108
  EXTRA_ROUTER_TESTING_PROVIDERS,
109
109
  { provide: Location, useClass: SpyLocation },
@@ -127,7 +127,7 @@ RouterTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", ver
127
127
  ɵprovidePreloading(NoPreloading),
128
128
  provideRoutes([]),
129
129
  ], imports: [RouterModule] });
130
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterTestingModule, decorators: [{
130
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: RouterTestingModule, decorators: [{
131
131
  type: NgModule,
132
132
  args: [{
133
133
  exports: [RouterModule],
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v14.1.0
2
+ * @license Angular v14.2.0-next.1
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v14.1.0
2
+ * @license Angular v14.2.0-next.1
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -70,6 +70,8 @@ export declare class ActivatedRoute {
70
70
  component: Type<any> | null;
71
71
  /** The current snapshot of this route */
72
72
  snapshot: ActivatedRouteSnapshot;
73
+ /** An Observable of the resolved route title */
74
+ readonly title: Observable<string | undefined>;
73
75
  /** The configuration used to match this route. */
74
76
  get routeConfig(): Route | null;
75
77
  /** The root of the router state. */
@@ -154,6 +156,8 @@ export declare class ActivatedRouteSnapshot {
154
156
  component: Type<any> | null;
155
157
  /** The configuration used to match this route **/
156
158
  readonly routeConfig: Route | null;
159
+ /** The resolved route title */
160
+ readonly title?: string;
157
161
  /** The root of the router state */
158
162
  get root(): ActivatedRouteSnapshot;
159
163
  /** The parent of this route in the router state tree */
@@ -258,7 +262,7 @@ export declare abstract class BaseRouteReuseStrategy implements RouteReuseStrate
258
262
  * ```
259
263
  * class UserToken {}
260
264
  * class Permissions {
261
- * canActivate(user: UserToken, id: string): boolean {
265
+ * canActivate(): boolean {
262
266
  * return true;
263
267
  * }
264
268
  * }
@@ -295,7 +299,7 @@ export declare abstract class BaseRouteReuseStrategy implements RouteReuseStrate
295
299
  * class AppModule {}
296
300
  * ```
297
301
  *
298
- * You can alternatively provide an in-line function with the `canActivate` signature:
302
+ * You can alternatively provide an in-line function with the `CanActivateFn` signature:
299
303
  *
300
304
  * ```
301
305
  * @NgModule({
@@ -304,16 +308,10 @@ export declare abstract class BaseRouteReuseStrategy implements RouteReuseStrate
304
308
  * {
305
309
  * path: 'team/:id',
306
310
  * component: TeamComponent,
307
- * canActivate: ['canActivateTeam']
311
+ * canActivate: [(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) => true]
308
312
  * }
309
313
  * ])
310
314
  * ],
311
- * providers: [
312
- * {
313
- * provide: 'canActivateTeam',
314
- * useValue: (route: ActivatedRouteSnapshot, state: RouterStateSnapshot) => true
315
- * }
316
- * ]
317
315
  * })
318
316
  * class AppModule {}
319
317
  * ```
@@ -380,7 +378,7 @@ export declare interface CanActivate {
380
378
  * class AppModule {}
381
379
  * ```
382
380
  *
383
- * You can alternatively provide an in-line function with the `canActivateChild` signature:
381
+ * You can alternatively provide an in-line function with the `CanActivateChildFn` signature:
384
382
  *
385
383
  * ```
386
384
  * @NgModule({
@@ -388,7 +386,7 @@ export declare interface CanActivate {
388
386
  * RouterModule.forRoot([
389
387
  * {
390
388
  * path: 'root',
391
- * canActivateChild: ['canActivateTeam'],
389
+ * canActivateChild: [(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) => true],
392
390
  * children: [
393
391
  * {
394
392
  * path: 'team/:id',
@@ -398,12 +396,6 @@ export declare interface CanActivate {
398
396
  * }
399
397
  * ])
400
398
  * ],
401
- * providers: [
402
- * {
403
- * provide: 'canActivateTeam',
404
- * useValue: (route: ActivatedRouteSnapshot, state: RouterStateSnapshot) => true
405
- * }
406
- * ]
407
399
  * })
408
400
  * class AppModule {}
409
401
  * ```
@@ -414,6 +406,24 @@ export declare interface CanActivateChild {
414
406
  canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree;
415
407
  }
416
408
 
409
+ /**
410
+ * The signature of a function used as a `canActivateChild` guard on a `Route`.
411
+ *
412
+ * @publicApi
413
+ * @see `CanActivateChild`
414
+ * @see `Route`
415
+ */
416
+ export declare type CanActivateChildFn = (childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot) => Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree;
417
+
418
+ /**
419
+ * The signature of a function used as a `canActivate` guard on a `Route`.
420
+ *
421
+ * @publicApi
422
+ * @see `CanActivate`
423
+ * @see `Route`
424
+ */
425
+ export declare type CanActivateFn = (route: ActivatedRouteSnapshot, state: RouterStateSnapshot) => Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree;
426
+
417
427
  /**
418
428
  * @description
419
429
  *
@@ -468,7 +478,7 @@ export declare interface CanActivateChild {
468
478
  * class AppModule {}
469
479
  * ```
470
480
  *
471
- * You can alternatively provide an in-line function with the `canDeactivate` signature:
481
+ * You can alternatively provide an in-line function with the `CanDeactivateFn` signature:
472
482
  *
473
483
  * ```
474
484
  * @NgModule({
@@ -477,17 +487,11 @@ export declare interface CanActivateChild {
477
487
  * {
478
488
  * path: 'team/:id',
479
489
  * component: TeamComponent,
480
- * canDeactivate: ['canDeactivateTeam']
490
+ * canDeactivate: [(component: TeamComponent, currentRoute: ActivatedRouteSnapshot,
491
+ * currentState: RouterStateSnapshot, nextState: RouterStateSnapshot) => true]
481
492
  * }
482
493
  * ])
483
494
  * ],
484
- * providers: [
485
- * {
486
- * provide: 'canDeactivateTeam',
487
- * useValue: (component: TeamComponent, currentRoute: ActivatedRouteSnapshot, currentState:
488
- * RouterStateSnapshot, nextState: RouterStateSnapshot) => true
489
- * }
490
- * ]
491
495
  * })
492
496
  * class AppModule {}
493
497
  * ```
@@ -498,6 +502,15 @@ export declare interface CanDeactivate<T> {
498
502
  canDeactivate(component: T, currentRoute: ActivatedRouteSnapshot, currentState: RouterStateSnapshot, nextState?: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree;
499
503
  }
500
504
 
505
+ /**
506
+ * The signature of a function used as a `canDeactivate` guard on a `Route`.
507
+ *
508
+ * @publicApi
509
+ * @see `CanDeactivate`
510
+ * @see `Route`
511
+ */
512
+ export declare type CanDeactivateFn<T> = (component: T, currentRoute: ActivatedRouteSnapshot, currentState: RouterStateSnapshot, nextState?: RouterStateSnapshot) => Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree;
513
+
501
514
  /**
502
515
  * @description
503
516
  *
@@ -549,7 +562,7 @@ export declare interface CanDeactivate<T> {
549
562
  * class AppModule {}
550
563
  * ```
551
564
  *
552
- * You can alternatively provide an in-line function with the `canLoad` signature:
565
+ * You can alternatively provide an in-line function with the `CanLoadFn` signature:
553
566
  *
554
567
  * ```
555
568
  * @NgModule({
@@ -559,16 +572,10 @@ export declare interface CanDeactivate<T> {
559
572
  * path: 'team/:id',
560
573
  * component: TeamComponent,
561
574
  * loadChildren: () => import('./team').then(mod => mod.TeamModule),
562
- * canLoad: ['canLoadTeamSection']
575
+ * canLoad: [(route: Route, segments: UrlSegment[]) => true]
563
576
  * }
564
577
  * ])
565
578
  * ],
566
- * providers: [
567
- * {
568
- * provide: 'canLoadTeamSection',
569
- * useValue: (route: Route, segments: UrlSegment[]) => true
570
- * }
571
- * ]
572
579
  * })
573
580
  * class AppModule {}
574
581
  * ```
@@ -579,6 +586,15 @@ export declare interface CanLoad {
579
586
  canLoad(route: Route, segments: UrlSegment[]): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree;
580
587
  }
581
588
 
589
+ /**
590
+ * The signature of a function used as a `canLoad` guard on a `Route`.
591
+ *
592
+ * @publicApi
593
+ * @see `CanLoad`
594
+ * @see `Route`
595
+ */
596
+ export declare type CanLoadFn = (route: Route, segments: UrlSegment[]) => Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree;
597
+
582
598
  /**
583
599
  * @description
584
600
  *
@@ -638,11 +654,9 @@ export declare interface CanLoad {
638
654
  * `team/:id` URL, but would load the `NotFoundComponent` because the `Route` for `'team/:id'`
639
655
  * could not be used for a URL match but the catch-all `**` `Route` did instead.
640
656
  *
641
- * You can alternatively provide an in-line function with the `canMatch` signature:
657
+ * You can alternatively provide an in-line function with the `CanMatchFn` signature:
642
658
  *
643
659
  * ```
644
- * const CAN_MATCH_TEAM_SECTION = new InjectionToken('CanMatchTeamSection');
645
- *
646
660
  * @NgModule({
647
661
  * imports: [
648
662
  * RouterModule.forRoot([
@@ -650,7 +664,7 @@ export declare interface CanLoad {
650
664
  * path: 'team/:id',
651
665
  * component: TeamComponent,
652
666
  * loadChildren: () => import('./team').then(mod => mod.TeamModule),
653
- * canMatch: [CAN_MATCH_TEAM_SECTION]
667
+ * canMatch: [(route: Route, segments: UrlSegment[]) => true]
654
668
  * },
655
669
  * {
656
670
  * path: '**',
@@ -658,12 +672,6 @@ export declare interface CanLoad {
658
672
  * }
659
673
  * ])
660
674
  * ],
661
- * providers: [
662
- * {
663
- * provide: CAN_MATCH_TEAM_SECTION,
664
- * useValue: (route: Route, segments: UrlSegment[]) => true
665
- * }
666
- * ]
667
675
  * })
668
676
  * class AppModule {}
669
677
  * ```
@@ -741,6 +749,8 @@ export declare class ChildrenOutletContexts {
741
749
  onOutletReAttached(contexts: Map<string, OutletContext>): void;
742
750
  getOrCreateContext(childName: string): OutletContext;
743
751
  getContext(childName: string): OutletContext | null;
752
+ static ɵfac: i0.ɵɵFactoryDeclaration<ChildrenOutletContexts, never>;
753
+ static ɵprov: i0.ɵɵInjectableDeclaration<ChildrenOutletContexts>;
744
754
  }
745
755
 
746
756
  /**
@@ -833,6 +843,23 @@ export declare class DefaultTitleStrategy extends TitleStrategy {
833
843
  static ɵprov: i0.ɵɵInjectableDeclaration<DefaultTitleStrategy>;
834
844
  }
835
845
 
846
+ /**
847
+ * Matches the route configuration (`route`) against the actual URL (`segments`).
848
+ *
849
+ * When no matcher is defined on a `Route`, this is the matcher used by the Router by default.
850
+ *
851
+ * @param segments The remaining unmatched segments in the current navigation
852
+ * @param segmentGroup The current segment group being matched
853
+ * @param route The `Route` to match against.
854
+ *
855
+ * @see UrlMatchResult
856
+ * @see Route
857
+ *
858
+ * @returns The resulting match information or `null` if the `route` should not match.
859
+ * @publicApi
860
+ */
861
+ export declare function defaultUrlMatcher(segments: UrlSegment[], segmentGroup: UrlSegmentGroup, route: Route): UrlMatchResult | null;
862
+
836
863
  /**
837
864
  * @description
838
865
  *
@@ -1234,9 +1261,6 @@ declare namespace i4 {
1234
1261
  * more control over when the router starts its initial navigation due to some complex
1235
1262
  * initialization logic.
1236
1263
  *
1237
- * The following values have been [deprecated](guide/releases#deprecation-practices) since v11,
1238
- * and should not be used for new applications.
1239
- *
1240
1264
  * @see `forRoot()`
1241
1265
  *
1242
1266
  * @publicApi
@@ -1797,7 +1821,7 @@ export declare const PRIMARY_OUTLET = "primary";
1797
1821
  *
1798
1822
  * @publicApi
1799
1823
  */
1800
- export declare function provideRoutes(routes: Routes): any;
1824
+ export declare function provideRoutes(routes: Routes): Provider[];
1801
1825
 
1802
1826
  /**
1803
1827
  *
@@ -1860,7 +1884,7 @@ export declare type QueryParamsHandling = 'merge' | 'preserve' | '';
1860
1884
  * export class AppRoutingModule {}
1861
1885
  * ```
1862
1886
  *
1863
- * You can alternatively provide an in-line function with the `resolve()` signature:
1887
+ * You can alternatively provide an in-line function with the `ResolveFn` signature:
1864
1888
  *
1865
1889
  * ```
1866
1890
  * export const myHero: Hero = {
@@ -1874,17 +1898,11 @@ export declare type QueryParamsHandling = 'merge' | 'preserve' | '';
1874
1898
  * path: 'detail/:id',
1875
1899
  * component: HeroComponent,
1876
1900
  * resolve: {
1877
- * hero: 'heroResolver'
1901
+ * hero: (route: ActivatedRouteSnapshot, state: RouterStateSnapshot) => myHero
1878
1902
  * }
1879
1903
  * }
1880
1904
  * ])
1881
1905
  * ],
1882
- * providers: [
1883
- * {
1884
- * provide: 'heroResolver',
1885
- * useValue: (route: ActivatedRouteSnapshot, state: RouterStateSnapshot) => myHero
1886
- * }
1887
- * ]
1888
1906
  * })
1889
1907
  * export class AppModule {}
1890
1908
  * ```
@@ -1947,7 +1965,7 @@ export declare interface Resolve<T> {
1947
1965
  * @publicApi
1948
1966
  */
1949
1967
  export declare type ResolveData = {
1950
- [key: string | symbol]: any;
1968
+ [key: string | symbol]: any | ResolveFn<unknown>;
1951
1969
  };
1952
1970
 
1953
1971
  /**
@@ -1974,6 +1992,14 @@ export declare class ResolveEnd extends RouterEvent {
1974
1992
  toString(): string;
1975
1993
  }
1976
1994
 
1995
+ /**
1996
+ * Function type definition for a data provider.
1997
+ *
1998
+ * @see `Route#resolve`.
1999
+ * @publicApi
2000
+ */
2001
+ export declare type ResolveFn<T> = (route: ActivatedRouteSnapshot, state: RouterStateSnapshot) => Observable<T> | Promise<T> | T;
2002
+
1977
2003
  /**
1978
2004
  * An event triggered at the start of the Resolve phase of routing.
1979
2005
  *
@@ -2234,7 +2260,7 @@ export declare interface Route {
2234
2260
  *
2235
2261
  * @see `PageTitleStrategy`
2236
2262
  */
2237
- title?: string | Type<Resolve<string>>;
2263
+ title?: string | Type<Resolve<string>> | ResolveFn<string>;
2238
2264
  /**
2239
2265
  * The path to match against. Cannot be used together with a custom `matcher` function.
2240
2266
  * A URL string that uses router matching notation.
@@ -2291,36 +2317,50 @@ export declare interface Route {
2291
2317
  */
2292
2318
  outlet?: string;
2293
2319
  /**
2294
- * An array of dependency-injection tokens used to look up `CanActivate()`
2320
+ * An array of `CanActivateFn` or DI tokens used to look up `CanActivate()`
2295
2321
  * handlers, in order to determine if the current user is allowed to
2296
2322
  * activate the component. By default, any user can activate.
2323
+ *
2324
+ * When using a function rather than DI tokens, the function can call `inject` to get any required
2325
+ * dependencies. This `inject` call must be done in a synchronous context.
2297
2326
  */
2298
- canActivate?: any[];
2327
+ canActivate?: Array<CanActivateFn | any>;
2299
2328
  /**
2300
- * An array of DI tokens used to look up `CanMatch()`
2329
+ * An array of `CanMatchFn` or DI tokens used to look up `CanMatch()`
2301
2330
  * handlers, in order to determine if the current user is allowed to
2302
2331
  * match the `Route`. By default, any route can match.
2332
+ *
2333
+ * When using a function rather than DI tokens, the function can call `inject` to get any required
2334
+ * dependencies. This `inject` call must be done in a synchronous context.
2303
2335
  */
2304
- canMatch?: Array<Type<CanMatch> | InjectionToken<CanMatchFn>>;
2336
+ canMatch?: Array<Type<CanMatch> | InjectionToken<CanMatchFn> | CanMatchFn>;
2305
2337
  /**
2306
- * An array of DI tokens used to look up `CanActivateChild()` handlers,
2338
+ * An array of `CanActivateChildFn` or DI tokens used to look up `CanActivateChild()` handlers,
2307
2339
  * in order to determine if the current user is allowed to activate
2308
2340
  * a child of the component. By default, any user can activate a child.
2341
+ *
2342
+ * When using a function rather than DI tokens, the function can call `inject` to get any required
2343
+ * dependencies. This `inject` call must be done in a synchronous context.
2309
2344
  */
2310
- canActivateChild?: any[];
2345
+ canActivateChild?: Array<CanActivateChildFn | any>;
2311
2346
  /**
2312
- * An array of DI tokens used to look up `CanDeactivate()`
2347
+ * An array of `CanDeactivateFn` or DI tokens used to look up `CanDeactivate()`
2313
2348
  * handlers, in order to determine if the current user is allowed to
2314
2349
  * deactivate the component. By default, any user can deactivate.
2315
2350
  *
2351
+ * When using a function rather than DI tokens, the function can call `inject` to get any required
2352
+ * dependencies. This `inject` call must be done in a synchronous context.
2316
2353
  */
2317
- canDeactivate?: any[];
2354
+ canDeactivate?: Array<CanDeactivateFn<any> | any>;
2318
2355
  /**
2319
- * An array of DI tokens used to look up `CanLoad()`
2356
+ * An array of `CanLoadFn` or DI tokens used to look up `CanLoad()`
2320
2357
  * handlers, in order to determine if the current user is allowed to
2321
2358
  * load the component. By default, any user can load.
2359
+ *
2360
+ * When using a function rather than DI tokens, the function can call `inject` to get any required
2361
+ * dependencies. This `inject` call must be done in a synchronous context.
2322
2362
  */
2323
- canLoad?: any[];
2363
+ canLoad?: Array<CanLoadFn | any>;
2324
2364
  /**
2325
2365
  * Additional developer-defined data provided to the component via
2326
2366
  * `ActivatedRoute`. By default, no additional data is passed.
@@ -3036,7 +3076,7 @@ export declare class RouterLink implements OnChanges {
3036
3076
  onClick(): boolean;
3037
3077
  get urlTree(): UrlTree | null;
3038
3078
  static ɵfac: i0.ɵɵFactoryDeclaration<RouterLink, [null, null, { attribute: "tabindex"; }, null, null]>;
3039
- static ɵdir: i0.ɵɵDirectiveDeclaration<RouterLink, ":not(a):not(area)[routerLink]", never, { "queryParams": "queryParams"; "fragment": "fragment"; "queryParamsHandling": "queryParamsHandling"; "preserveFragment": "preserveFragment"; "skipLocationChange": "skipLocationChange"; "replaceUrl": "replaceUrl"; "state": "state"; "relativeTo": "relativeTo"; "routerLink": "routerLink"; }, {}, never, never, false>;
3079
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RouterLink, ":not(a):not(area)[routerLink]", never, { "queryParams": "queryParams"; "fragment": "fragment"; "queryParamsHandling": "queryParamsHandling"; "preserveFragment": "preserveFragment"; "skipLocationChange": "skipLocationChange"; "replaceUrl": "replaceUrl"; "state": "state"; "relativeTo": "relativeTo"; "routerLink": "routerLink"; }, {}, never, never, true>;
3040
3080
  }
3041
3081
 
3042
3082
  /**
@@ -3169,7 +3209,7 @@ export declare class RouterLinkActive implements OnChanges, OnDestroy, AfterCont
3169
3209
  private isLinkActive;
3170
3210
  private hasActiveLinks;
3171
3211
  static ɵfac: i0.ɵɵFactoryDeclaration<RouterLinkActive, [null, null, null, null, { optional: true; }, { optional: true; }]>;
3172
- static ɵdir: i0.ɵɵDirectiveDeclaration<RouterLinkActive, "[routerLinkActive]", ["routerLinkActive"], { "routerLinkActiveOptions": "routerLinkActiveOptions"; "ariaCurrentWhenActive": "ariaCurrentWhenActive"; "routerLinkActive": "routerLinkActive"; }, { "isActiveChange": "isActiveChange"; }, ["links", "linksWithHrefs"], never, false>;
3212
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RouterLinkActive, "[routerLinkActive]", ["routerLinkActive"], { "routerLinkActiveOptions": "routerLinkActiveOptions"; "ariaCurrentWhenActive": "ariaCurrentWhenActive"; "routerLinkActive": "routerLinkActive"; }, { "isActiveChange": "isActiveChange"; }, ["links", "linksWithHrefs"], never, true>;
3173
3213
  }
3174
3214
 
3175
3215
  /**
@@ -3270,7 +3310,7 @@ export declare class RouterLinkWithHref implements OnChanges, OnDestroy {
3270
3310
  private updateTargetUrlAndHref;
3271
3311
  get urlTree(): UrlTree | null;
3272
3312
  static ɵfac: i0.ɵɵFactoryDeclaration<RouterLinkWithHref, never>;
3273
- static ɵdir: i0.ɵɵDirectiveDeclaration<RouterLinkWithHref, "a[routerLink],area[routerLink]", never, { "target": "target"; "queryParams": "queryParams"; "fragment": "fragment"; "queryParamsHandling": "queryParamsHandling"; "preserveFragment": "preserveFragment"; "skipLocationChange": "skipLocationChange"; "replaceUrl": "replaceUrl"; "state": "state"; "relativeTo": "relativeTo"; "routerLink": "routerLink"; }, {}, never, never, false>;
3313
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RouterLinkWithHref, "a[routerLink],area[routerLink]", never, { "target": "target"; "queryParams": "queryParams"; "fragment": "fragment"; "queryParamsHandling": "queryParamsHandling"; "preserveFragment": "preserveFragment"; "skipLocationChange": "skipLocationChange"; "replaceUrl": "replaceUrl"; "state": "state"; "relativeTo": "relativeTo"; "routerLink": "routerLink"; }, {}, never, never, true>;
3274
3314
  }
3275
3315
 
3276
3316
  /**
@@ -3295,7 +3335,7 @@ export declare class RouterLinkWithHref implements OnChanges, OnDestroy {
3295
3335
  * @publicApi
3296
3336
  */
3297
3337
  export declare class RouterModule {
3298
- constructor(guard: any, router: Router);
3338
+ constructor(guard: any);
3299
3339
  /**
3300
3340
  * Creates and configures a module with all the router providers and directives.
3301
3341
  * Optionally sets up an application listener to perform an initial navigation.
@@ -3332,8 +3372,8 @@ export declare class RouterModule {
3332
3372
  *
3333
3373
  */
3334
3374
  static forChild(routes: Routes): ModuleWithProviders<RouterModule>;
3335
- static ɵfac: i0.ɵɵFactoryDeclaration<RouterModule, [{ optional: true; }, { optional: true; }]>;
3336
- static ɵmod: i0.ɵɵNgModuleDeclaration<RouterModule, [typeof i1.RouterOutlet, typeof i2.RouterLink, typeof i2.RouterLinkWithHref, typeof i3.RouterLinkActive, typeof i4.ɵEmptyOutletComponent], never, [typeof i1.RouterOutlet, typeof i2.RouterLink, typeof i2.RouterLinkWithHref, typeof i3.RouterLinkActive, typeof i4.ɵEmptyOutletComponent]>;
3375
+ static ɵfac: i0.ɵɵFactoryDeclaration<RouterModule, [{ optional: true; }]>;
3376
+ static ɵmod: i0.ɵɵNgModuleDeclaration<RouterModule, never, [typeof i1.RouterOutlet, typeof i2.RouterLink, typeof i2.RouterLinkWithHref, typeof i3.RouterLinkActive, typeof i4.ɵEmptyOutletComponent], [typeof i1.RouterOutlet, typeof i2.RouterLink, typeof i2.RouterLinkWithHref, typeof i3.RouterLinkActive, typeof i4.ɵEmptyOutletComponent]>;
3337
3377
  static ɵinj: i0.ɵɵInjectorDeclaration<RouterModule>;
3338
3378
  }
3339
3379
 
@@ -3432,7 +3472,7 @@ export declare class RouterOutlet implements OnDestroy, OnInit, RouterOutletCont
3432
3472
  deactivate(): void;
3433
3473
  activateWith(activatedRoute: ActivatedRoute, resolverOrInjector?: ComponentFactoryResolver | EnvironmentInjector | null): void;
3434
3474
  static ɵfac: i0.ɵɵFactoryDeclaration<RouterOutlet, [null, null, { attribute: "name"; }, null, null]>;
3435
- static ɵdir: i0.ɵɵDirectiveDeclaration<RouterOutlet, "router-outlet", ["outlet"], {}, { "activateEvents": "activate"; "deactivateEvents": "deactivate"; "attachEvents": "attach"; "detachEvents": "detach"; }, never, never, false>;
3475
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RouterOutlet, "router-outlet", ["outlet"], {}, { "activateEvents": "activate"; "deactivateEvents": "deactivate"; "attachEvents": "attach"; "detachEvents": "detach"; }, never, never, true>;
3436
3476
  }
3437
3477
 
3438
3478
  /**
@@ -4023,6 +4063,8 @@ export declare abstract class UrlSerializer {
4023
4063
  abstract parse(url: string): UrlTree;
4024
4064
  /** Converts a `UrlTree` into a url */
4025
4065
  abstract serialize(tree: UrlTree): string;
4066
+ static ɵfac: i0.ɵɵFactoryDeclaration<UrlSerializer, never>;
4067
+ static ɵprov: i0.ɵɵInjectableDeclaration<UrlSerializer>;
4026
4068
  }
4027
4069
 
4028
4070
  /**
@@ -4085,7 +4127,7 @@ export declare function ɵassignExtraOptionsToRouter(opts: ExtraOptions, router:
4085
4127
  */
4086
4128
  export declare class ɵEmptyOutletComponent {
4087
4129
  static ɵfac: i0.ɵɵFactoryDeclaration<ɵEmptyOutletComponent, never>;
4088
- static ɵcmp: i0.ɵɵComponentDeclaration<ɵEmptyOutletComponent, "ng-component", never, {}, {}, never, never, false>;
4130
+ static ɵcmp: i0.ɵɵComponentDeclaration<ɵEmptyOutletComponent, "ng-component", never, {}, {}, never, never, true>;
4089
4131
  }
4090
4132
 
4091
4133
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/router",
3
- "version": "14.1.0",
3
+ "version": "14.2.0-next.1",
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",
28
- "@angular/common": "14.1.0",
29
- "@angular/platform-browser": "14.1.0",
27
+ "@angular/core": "14.2.0-next.1",
28
+ "@angular/common": "14.2.0-next.1",
29
+ "@angular/platform-browser": "14.2.0-next.1",
30
30
  "rxjs": "^6.5.3 || ^7.4.0"
31
31
  },
32
32
  "ng-update": {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v14.1.0
2
+ * @license Angular v14.2.0-next.1
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v14.1.0
2
+ * @license Angular v14.2.0-next.1
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */