@angular/router 19.1.0-next.0 → 19.1.0-next.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/fesm2022/router.mjs +107 -107
- package/fesm2022/router.mjs.map +1 -1
- package/fesm2022/testing.mjs +12 -12
- package/fesm2022/testing.mjs.map +1 -1
- package/fesm2022/upgrade.mjs +1 -1
- package/index.d.ts +63 -63
- package/package.json +4 -4
- package/testing/index.d.ts +2 -2
- package/upgrade/index.d.ts +1 -1
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v19.1.0-next.
|
|
2
|
+
* @license Angular v19.1.0-next.2
|
|
3
3
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -109,7 +109,7 @@ export declare class ActivatedRoute {
|
|
|
109
109
|
* The following example initializes a component with route information extracted
|
|
110
110
|
* from the snapshot of the root node at the time of creation.
|
|
111
111
|
*
|
|
112
|
-
* ```
|
|
112
|
+
* ```ts
|
|
113
113
|
* @Component({templateUrl:'./my-component.html'})
|
|
114
114
|
* class MyComponent {
|
|
115
115
|
* constructor(route: ActivatedRoute) {
|
|
@@ -260,7 +260,7 @@ export declare abstract class BaseRouteReuseStrategy implements RouteReuseStrate
|
|
|
260
260
|
* The following example implements a `CanActivate` function that checks whether the
|
|
261
261
|
* current user has permission to activate the requested route.
|
|
262
262
|
*
|
|
263
|
-
* ```
|
|
263
|
+
* ```ts
|
|
264
264
|
* class UserToken {}
|
|
265
265
|
* class Permissions {
|
|
266
266
|
* canActivate(): boolean {
|
|
@@ -284,7 +284,7 @@ export declare abstract class BaseRouteReuseStrategy implements RouteReuseStrate
|
|
|
284
284
|
* Here, the defined guard function is provided as part of the `Route` object
|
|
285
285
|
* in the router configuration:
|
|
286
286
|
*
|
|
287
|
-
* ```
|
|
287
|
+
* ```ts
|
|
288
288
|
* @NgModule({
|
|
289
289
|
* imports: [
|
|
290
290
|
* RouterModule.forRoot([
|
|
@@ -317,7 +317,7 @@ export declare interface CanActivate {
|
|
|
317
317
|
* The following example implements a `CanActivateChild` function that checks whether the
|
|
318
318
|
* current user has permission to activate the requested child route.
|
|
319
319
|
*
|
|
320
|
-
* ```
|
|
320
|
+
* ```ts
|
|
321
321
|
* class UserToken {}
|
|
322
322
|
* class Permissions {
|
|
323
323
|
* canActivate(user: UserToken, id: string): boolean {
|
|
@@ -341,7 +341,7 @@ export declare interface CanActivate {
|
|
|
341
341
|
* Here, the defined guard function is provided as part of the `Route` object
|
|
342
342
|
* in the router configuration:
|
|
343
343
|
*
|
|
344
|
-
* ```
|
|
344
|
+
* ```ts
|
|
345
345
|
* @NgModule({
|
|
346
346
|
* imports: [
|
|
347
347
|
* RouterModule.forRoot([
|
|
@@ -450,7 +450,7 @@ export declare type CanActivateFn = (route: ActivatedRouteSnapshot, state: Route
|
|
|
450
450
|
* The following example implements a `CanDeactivate` function that checks whether the
|
|
451
451
|
* current user has permission to deactivate the requested route.
|
|
452
452
|
*
|
|
453
|
-
* ```
|
|
453
|
+
* ```ts
|
|
454
454
|
* class UserToken {}
|
|
455
455
|
* class Permissions {
|
|
456
456
|
* canDeactivate(user: UserToken, id: string): boolean {
|
|
@@ -528,7 +528,7 @@ export declare type CanDeactivateFn<T> = (component: T, currentRoute: ActivatedR
|
|
|
528
528
|
* current user has permission to load requested child routes.
|
|
529
529
|
*
|
|
530
530
|
*
|
|
531
|
-
* ```
|
|
531
|
+
* ```ts
|
|
532
532
|
* class UserToken {}
|
|
533
533
|
* class Permissions {
|
|
534
534
|
* canLoadChildren(user: UserToken, id: string, segments: UrlSegment[]): boolean {
|
|
@@ -597,7 +597,7 @@ export declare type CanLoadFn = (route: Route, segments: UrlSegment[]) => MaybeA
|
|
|
597
597
|
* current user has permission to access the users page.
|
|
598
598
|
*
|
|
599
599
|
*
|
|
600
|
-
* ```
|
|
600
|
+
* ```ts
|
|
601
601
|
* class UserToken {}
|
|
602
602
|
* class Permissions {
|
|
603
603
|
* canAccess(user: UserToken, route: Route, segments: UrlSegment[]): boolean {
|
|
@@ -771,7 +771,7 @@ export declare function convertToParamMap(params: Params): ParamMap;
|
|
|
771
771
|
*
|
|
772
772
|
* @usageNotes
|
|
773
773
|
*
|
|
774
|
-
* ```
|
|
774
|
+
* ```ts
|
|
775
775
|
* // create /team/33/user/11
|
|
776
776
|
* createUrlTreeFromSnapshot(snapshot, ['/team', 33, 'user', 11]);
|
|
777
777
|
*
|
|
@@ -1252,7 +1252,7 @@ export declare interface InMemoryScrollingOptions {
|
|
|
1252
1252
|
* You can implement custom scroll restoration behavior by adapting the enabled behavior as
|
|
1253
1253
|
* in the following example.
|
|
1254
1254
|
*
|
|
1255
|
-
* ```
|
|
1255
|
+
* ```ts
|
|
1256
1256
|
* class AppComponent {
|
|
1257
1257
|
* movieData: any;
|
|
1258
1258
|
*
|
|
@@ -1346,14 +1346,14 @@ export declare type LoadChildren = LoadChildrenCallback;
|
|
|
1346
1346
|
*
|
|
1347
1347
|
* For example:
|
|
1348
1348
|
*
|
|
1349
|
-
* ```
|
|
1349
|
+
* ```ts
|
|
1350
1350
|
* [{
|
|
1351
1351
|
* path: 'lazy',
|
|
1352
1352
|
* loadChildren: () => import('./lazy-route/lazy.module').then(mod => mod.LazyModule),
|
|
1353
1353
|
* }];
|
|
1354
1354
|
* ```
|
|
1355
1355
|
* or
|
|
1356
|
-
* ```
|
|
1356
|
+
* ```ts
|
|
1357
1357
|
* [{
|
|
1358
1358
|
* path: 'lazy',
|
|
1359
1359
|
* loadChildren: () => import('./lazy-route/lazy.routes').then(mod => mod.ROUTES),
|
|
@@ -1361,7 +1361,7 @@ export declare type LoadChildren = LoadChildrenCallback;
|
|
|
1361
1361
|
* ```
|
|
1362
1362
|
*
|
|
1363
1363
|
* If the lazy-loaded routes are exported via a `default` export, the `.then` can be omitted:
|
|
1364
|
-
* ```
|
|
1364
|
+
* ```ts
|
|
1365
1365
|
* [{
|
|
1366
1366
|
* path: 'lazy',
|
|
1367
1367
|
* loadChildren: () => import('./lazy-route/lazy.routes'),
|
|
@@ -2018,7 +2018,7 @@ export declare type Params = {
|
|
|
2018
2018
|
*
|
|
2019
2019
|
* Provides a preloading strategy that preloads all modules as quickly as possible.
|
|
2020
2020
|
*
|
|
2021
|
-
* ```
|
|
2021
|
+
* ```ts
|
|
2022
2022
|
* RouterModule.forRoot(ROUTES, {preloadingStrategy: PreloadAllModules})
|
|
2023
2023
|
* ```
|
|
2024
2024
|
*
|
|
@@ -2066,7 +2066,7 @@ export declare const PRIMARY_OUTLET = "primary";
|
|
|
2066
2066
|
* @usageNotes
|
|
2067
2067
|
*
|
|
2068
2068
|
* Basic example of how you can add a Router to your application:
|
|
2069
|
-
* ```
|
|
2069
|
+
* ```ts
|
|
2070
2070
|
* const appRoutes: Routes = [];
|
|
2071
2071
|
* bootstrapApplication(AppComponent, {
|
|
2072
2072
|
* providers: [provideRouter(appRoutes)]
|
|
@@ -2075,7 +2075,7 @@ export declare const PRIMARY_OUTLET = "primary";
|
|
|
2075
2075
|
*
|
|
2076
2076
|
* You can also enable optional features in the Router by adding functions from the `RouterFeatures`
|
|
2077
2077
|
* type:
|
|
2078
|
-
* ```
|
|
2078
|
+
* ```ts
|
|
2079
2079
|
* const appRoutes: Routes = [];
|
|
2080
2080
|
* bootstrapApplication(AppComponent,
|
|
2081
2081
|
* {
|
|
@@ -2103,7 +2103,7 @@ export declare function provideRouter(routes: Routes, ...features: RouterFeature
|
|
|
2103
2103
|
*
|
|
2104
2104
|
* @usageNotes
|
|
2105
2105
|
*
|
|
2106
|
-
* ```
|
|
2106
|
+
* ```ts
|
|
2107
2107
|
* @NgModule({
|
|
2108
2108
|
* providers: [provideRoutes(ROUTES)]
|
|
2109
2109
|
* })
|
|
@@ -2196,7 +2196,7 @@ export declare type RedirectFunction = (redirectData: Pick<ActivatedRouteSnapsho
|
|
|
2196
2196
|
* The following example implements a `resolve()` method that retrieves the data
|
|
2197
2197
|
* needed to activate the requested route.
|
|
2198
2198
|
*
|
|
2199
|
-
* ```
|
|
2199
|
+
* ```ts
|
|
2200
2200
|
* @Injectable({ providedIn: 'root' })
|
|
2201
2201
|
* export class HeroResolver implements Resolve<Hero> {
|
|
2202
2202
|
* constructor(private service: HeroService) {}
|
|
@@ -2234,7 +2234,7 @@ export declare type RedirectFunction = (redirectData: Pick<ActivatedRouteSnapsho
|
|
|
2234
2234
|
*
|
|
2235
2235
|
* And you can access to your resolved data from `HeroComponent`:
|
|
2236
2236
|
*
|
|
2237
|
-
* ```
|
|
2237
|
+
* ```ts
|
|
2238
2238
|
* @Component({
|
|
2239
2239
|
* selector: "app-hero",
|
|
2240
2240
|
* templateUrl: "hero.component.html",
|
|
@@ -2258,7 +2258,7 @@ export declare type RedirectFunction = (redirectData: Pick<ActivatedRouteSnapsho
|
|
|
2258
2258
|
* all guards have run and succeeded.
|
|
2259
2259
|
* For example, consider the following route configuration:
|
|
2260
2260
|
*
|
|
2261
|
-
* ```
|
|
2261
|
+
* ```ts
|
|
2262
2262
|
* {
|
|
2263
2263
|
* path: 'base'
|
|
2264
2264
|
* canActivate: [BaseGuard],
|
|
@@ -2405,7 +2405,7 @@ export declare class ResolveEnd extends RouterEvent {
|
|
|
2405
2405
|
* all guards have run and succeeded.
|
|
2406
2406
|
* For example, consider the following route configuration:
|
|
2407
2407
|
*
|
|
2408
|
-
* ```
|
|
2408
|
+
* ```ts
|
|
2409
2409
|
* {
|
|
2410
2410
|
* path: 'base'
|
|
2411
2411
|
* canActivate: [baseGuard],
|
|
@@ -2474,7 +2474,7 @@ export declare class ResolveStart extends RouterEvent {
|
|
|
2474
2474
|
* `/team/11/user/bob`, the router creates the 'Team' component
|
|
2475
2475
|
* with the 'User' child component in it.
|
|
2476
2476
|
*
|
|
2477
|
-
* ```
|
|
2477
|
+
* ```ts
|
|
2478
2478
|
* [{
|
|
2479
2479
|
* path: 'team/:id',
|
|
2480
2480
|
* component: Team,
|
|
@@ -2491,7 +2491,7 @@ export declare class ResolveStart extends RouterEvent {
|
|
|
2491
2491
|
* When navigating to `/team/11(aux:chat/jim)`, the router creates the 'Team' component next to
|
|
2492
2492
|
* the 'Chat' component. The 'Chat' component is placed into the 'aux' outlet.
|
|
2493
2493
|
*
|
|
2494
|
-
* ```
|
|
2494
|
+
* ```ts
|
|
2495
2495
|
* [{
|
|
2496
2496
|
* path: 'team/:id',
|
|
2497
2497
|
* component: Team
|
|
@@ -2507,7 +2507,7 @@ export declare class ResolveStart extends RouterEvent {
|
|
|
2507
2507
|
* The following route uses wild-card notation to specify a component
|
|
2508
2508
|
* that is always instantiated regardless of where you navigate to.
|
|
2509
2509
|
*
|
|
2510
|
-
* ```
|
|
2510
|
+
* ```ts
|
|
2511
2511
|
* [{
|
|
2512
2512
|
* path: '**',
|
|
2513
2513
|
* component: WildcardComponent
|
|
@@ -2523,7 +2523,7 @@ export declare class ResolveStart extends RouterEvent {
|
|
|
2523
2523
|
* '/team/11/legacy/user/jim' to '/team/11/user/jim', and then instantiates
|
|
2524
2524
|
* the Team component with the User child component in it.
|
|
2525
2525
|
*
|
|
2526
|
-
* ```
|
|
2526
|
+
* ```ts
|
|
2527
2527
|
* [{
|
|
2528
2528
|
* path: 'team/:id',
|
|
2529
2529
|
* component: Team,
|
|
@@ -2549,7 +2549,7 @@ export declare class ResolveStart extends RouterEvent {
|
|
|
2549
2549
|
* In the following configuration, when navigating to
|
|
2550
2550
|
* `/team/11`, the router instantiates the 'AllUsers' component.
|
|
2551
2551
|
*
|
|
2552
|
-
* ```
|
|
2552
|
+
* ```ts
|
|
2553
2553
|
* [{
|
|
2554
2554
|
* path: 'team/:id',
|
|
2555
2555
|
* component: Team,
|
|
@@ -2569,7 +2569,7 @@ export declare class ResolveStart extends RouterEvent {
|
|
|
2569
2569
|
*
|
|
2570
2570
|
* Note that an empty path route inherits its parent's parameters and data.
|
|
2571
2571
|
*
|
|
2572
|
-
* ```
|
|
2572
|
+
* ```ts
|
|
2573
2573
|
* [{
|
|
2574
2574
|
* path: 'team/:id',
|
|
2575
2575
|
* component: Team,
|
|
@@ -2590,7 +2590,7 @@ export declare class ResolveStart extends RouterEvent {
|
|
|
2590
2590
|
* checks URL elements from the left to see if the URL matches a specified path.
|
|
2591
2591
|
* For example, '/team/11/user' matches 'team/:id'.
|
|
2592
2592
|
*
|
|
2593
|
-
* ```
|
|
2593
|
+
* ```ts
|
|
2594
2594
|
* [{
|
|
2595
2595
|
* path: '',
|
|
2596
2596
|
* pathMatch: 'prefix', //default
|
|
@@ -2610,7 +2610,7 @@ export declare class ResolveStart extends RouterEvent {
|
|
|
2610
2610
|
* In the following example, supplying the 'full' `pathMatch` strategy ensures
|
|
2611
2611
|
* that the router applies the redirect if and only if navigating to '/'.
|
|
2612
2612
|
*
|
|
2613
|
-
* ```
|
|
2613
|
+
* ```ts
|
|
2614
2614
|
* [{
|
|
2615
2615
|
* path: '',
|
|
2616
2616
|
* pathMatch: 'full',
|
|
@@ -2633,7 +2633,7 @@ export declare class ResolveStart extends RouterEvent {
|
|
|
2633
2633
|
* the main child and aux child components next to each other.
|
|
2634
2634
|
* For this to work, the application component must have the primary and aux outlets defined.
|
|
2635
2635
|
*
|
|
2636
|
-
* ```
|
|
2636
|
+
* ```ts
|
|
2637
2637
|
* [{
|
|
2638
2638
|
* path: 'parent/:id',
|
|
2639
2639
|
* children: [
|
|
@@ -2651,7 +2651,7 @@ export declare class ResolveStart extends RouterEvent {
|
|
|
2651
2651
|
* With this configuration, navigating to '/parent/10' creates
|
|
2652
2652
|
* the main child and aux components.
|
|
2653
2653
|
*
|
|
2654
|
-
* ```
|
|
2654
|
+
* ```ts
|
|
2655
2655
|
* [{
|
|
2656
2656
|
* path: 'parent/:id',
|
|
2657
2657
|
* children: [
|
|
@@ -2671,7 +2671,7 @@ export declare class ResolveStart extends RouterEvent {
|
|
|
2671
2671
|
* Given the following example route, the router will lazy load
|
|
2672
2672
|
* the associated module on demand using the browser native import system.
|
|
2673
2673
|
*
|
|
2674
|
-
* ```
|
|
2674
|
+
* ```ts
|
|
2675
2675
|
* [{
|
|
2676
2676
|
* path: 'lazy',
|
|
2677
2677
|
* loadChildren: () => import('./lazy-route/lazy.module').then(mod => mod.LazyModule),
|
|
@@ -3177,12 +3177,12 @@ export declare const ROUTER_INITIALIZER: InjectionToken<(compRef: ComponentRef<a
|
|
|
3177
3177
|
* @usageNotes
|
|
3178
3178
|
*
|
|
3179
3179
|
* To set the data from the template of the component with `router-outlet`:
|
|
3180
|
-
* ```
|
|
3180
|
+
* ```html
|
|
3181
3181
|
* <router-outlet [routerOutletData]="{name: 'Angular'}" />
|
|
3182
3182
|
* ```
|
|
3183
3183
|
*
|
|
3184
3184
|
* To read the data in the routed component:
|
|
3185
|
-
* ```
|
|
3185
|
+
* ```ts
|
|
3186
3186
|
* data = inject(ROUTER_OUTLET_DATA) as Signal<{name: string}>;
|
|
3187
3187
|
* ```
|
|
3188
3188
|
*
|
|
@@ -3451,7 +3451,7 @@ export declare type RouterHashLocationFeature = RouterFeature<RouterFeatureKind.
|
|
|
3451
3451
|
*
|
|
3452
3452
|
* The following link adds a query parameter and a fragment to the generated URL:
|
|
3453
3453
|
*
|
|
3454
|
-
* ```
|
|
3454
|
+
* ```html
|
|
3455
3455
|
* <a [routerLink]="['/user/bob']" [queryParams]="{debug: true}" fragment="education">
|
|
3456
3456
|
* link to user component
|
|
3457
3457
|
* </a>
|
|
@@ -3468,7 +3468,7 @@ export declare type RouterHashLocationFeature = RouterFeature<RouterFeatureKind.
|
|
|
3468
3468
|
*
|
|
3469
3469
|
* For example:
|
|
3470
3470
|
*
|
|
3471
|
-
* ```
|
|
3471
|
+
* ```html
|
|
3472
3472
|
* <a [routerLink]="['/user/bob']" [queryParams]="{debug: true}" queryParamsHandling="merge">
|
|
3473
3473
|
* link to user component
|
|
3474
3474
|
* </a>
|
|
@@ -3485,7 +3485,7 @@ export declare type RouterHashLocationFeature = RouterFeature<RouterFeatureKind.
|
|
|
3485
3485
|
* [`History.state` property](https://developer.mozilla.org/en-US/docs/Web/API/History#Properties).
|
|
3486
3486
|
* For example:
|
|
3487
3487
|
*
|
|
3488
|
-
* ```
|
|
3488
|
+
* ```html
|
|
3489
3489
|
* <a [routerLink]="['/user/bob']" [state]="{tracingId: 123}">
|
|
3490
3490
|
* link to user component
|
|
3491
3491
|
* </a>
|
|
@@ -3495,7 +3495,7 @@ export declare type RouterHashLocationFeature = RouterFeature<RouterFeatureKind.
|
|
|
3495
3495
|
* navigation-state value. For example, to capture the `tracingId` during the `NavigationStart`
|
|
3496
3496
|
* event:
|
|
3497
3497
|
*
|
|
3498
|
-
* ```
|
|
3498
|
+
* ```ts
|
|
3499
3499
|
* // Get NavigationStart events
|
|
3500
3500
|
* router.events.pipe(filter(e => e instanceof NavigationStart)).subscribe(e => {
|
|
3501
3501
|
* const navigation = router.getCurrentNavigation();
|
|
@@ -3642,7 +3642,7 @@ export { RouterLink as RouterLinkWithHref }
|
|
|
3642
3642
|
* For example, the following code highlights the word "Bob" when the router
|
|
3643
3643
|
* activates the associated route:
|
|
3644
3644
|
*
|
|
3645
|
-
* ```
|
|
3645
|
+
* ```html
|
|
3646
3646
|
* <a routerLink="/user/bob" routerLinkActive="active-link">Bob</a>
|
|
3647
3647
|
* ```
|
|
3648
3648
|
*
|
|
@@ -3652,14 +3652,14 @@ export { RouterLink as RouterLinkWithHref }
|
|
|
3652
3652
|
* You can set more than one class using a space-separated string or an array.
|
|
3653
3653
|
* For example:
|
|
3654
3654
|
*
|
|
3655
|
-
* ```
|
|
3655
|
+
* ```html
|
|
3656
3656
|
* <a routerLink="/user/bob" routerLinkActive="class1 class2">Bob</a>
|
|
3657
3657
|
* <a routerLink="/user/bob" [routerLinkActive]="['class1', 'class2']">Bob</a>
|
|
3658
3658
|
* ```
|
|
3659
3659
|
*
|
|
3660
3660
|
* To add the classes only when the URL matches the link exactly, add the option `exact: true`:
|
|
3661
3661
|
*
|
|
3662
|
-
* ```
|
|
3662
|
+
* ```html
|
|
3663
3663
|
* <a routerLink="/user/bob" routerLinkActive="active-link" [routerLinkActiveOptions]="{exact:
|
|
3664
3664
|
* true}">Bob</a>
|
|
3665
3665
|
* ```
|
|
@@ -3668,7 +3668,7 @@ export { RouterLink as RouterLinkWithHref }
|
|
|
3668
3668
|
* instance to a template variable.
|
|
3669
3669
|
* For example, the following checks the status without assigning any CSS classes:
|
|
3670
3670
|
*
|
|
3671
|
-
* ```
|
|
3671
|
+
* ```html
|
|
3672
3672
|
* <a routerLink="/user/bob" routerLinkActive #rla="routerLinkActive">
|
|
3673
3673
|
* Bob {{ rla.isActive ? '(already open)' : ''}}
|
|
3674
3674
|
* </a>
|
|
@@ -3678,7 +3678,7 @@ export { RouterLink as RouterLinkWithHref }
|
|
|
3678
3678
|
* For example, the following sets the active-link class on the `<div>` parent tag
|
|
3679
3679
|
* when the URL is either '/user/jim' or '/user/bob'.
|
|
3680
3680
|
*
|
|
3681
|
-
* ```
|
|
3681
|
+
* ```html
|
|
3682
3682
|
* <div routerLinkActive="active-link" [routerLinkActiveOptions]="{exact: true}">
|
|
3683
3683
|
* <a routerLink="/user/jim">Jim</a>
|
|
3684
3684
|
* <a routerLink="/user/bob">Bob</a>
|
|
@@ -3691,7 +3691,7 @@ export { RouterLink as RouterLinkWithHref }
|
|
|
3691
3691
|
* For example, the following code adds the 'active' class to the Home Page link when it is
|
|
3692
3692
|
* indeed active and in such case also sets its aria-current attribute to 'page':
|
|
3693
3693
|
*
|
|
3694
|
-
* ```
|
|
3694
|
+
* ```html
|
|
3695
3695
|
* <a routerLink="/" routerLinkActive="active" ariaCurrentWhenActive="page">Home Page</a>
|
|
3696
3696
|
* ```
|
|
3697
3697
|
*
|
|
@@ -3834,7 +3834,7 @@ export declare class RouterModule {
|
|
|
3834
3834
|
* Each outlet can have a unique name, determined by the optional `name` attribute.
|
|
3835
3835
|
* The name cannot be set or changed dynamically. If not set, default value is "primary".
|
|
3836
3836
|
*
|
|
3837
|
-
* ```
|
|
3837
|
+
* ```html
|
|
3838
3838
|
* <router-outlet></router-outlet>
|
|
3839
3839
|
* <router-outlet name='left'></router-outlet>
|
|
3840
3840
|
* <router-outlet name='right'></router-outlet>
|
|
@@ -3861,7 +3861,7 @@ export declare class RouterModule {
|
|
|
3861
3861
|
* subtree, and the detached event emits when the `RouteReuseStrategy` instructs the outlet to
|
|
3862
3862
|
* detach the subtree.
|
|
3863
3863
|
*
|
|
3864
|
-
* ```
|
|
3864
|
+
* ```html
|
|
3865
3865
|
* <router-outlet
|
|
3866
3866
|
* (activate)='onActivate($event)'
|
|
3867
3867
|
* (deactivate)='onDeactivate($event)'
|
|
@@ -4060,7 +4060,7 @@ export declare class RouterPreloader implements OnDestroy {
|
|
|
4060
4060
|
* The following fragment shows how a component gets the root node
|
|
4061
4061
|
* of the current state to establish its own route tree:
|
|
4062
4062
|
*
|
|
4063
|
-
* ```
|
|
4063
|
+
* ```ts
|
|
4064
4064
|
* @Component({templateUrl:'template.html'})
|
|
4065
4065
|
* class MyComponent {
|
|
4066
4066
|
* constructor(router: Router) {
|
|
@@ -4095,7 +4095,7 @@ export declare class RouterState extends Tree<ActivatedRoute> {
|
|
|
4095
4095
|
* The following example shows how a component is initialized with information
|
|
4096
4096
|
* from the snapshot of the root node's state at the time of creation.
|
|
4097
4097
|
*
|
|
4098
|
-
* ```
|
|
4098
|
+
* ```ts
|
|
4099
4099
|
* @Component({templateUrl:'template.html'})
|
|
4100
4100
|
* class MyComponent {
|
|
4101
4101
|
* constructor(router: Router) {
|
|
@@ -4219,7 +4219,7 @@ declare function standardizeConfig(r: Route): Route;
|
|
|
4219
4219
|
* The built-in implementation traverses the router state snapshot and finds the deepest primary
|
|
4220
4220
|
* outlet with `title` property. Given the `Routes` below, navigating to
|
|
4221
4221
|
* `/base/child(popup:aux)` would result in the document title being set to "child".
|
|
4222
|
-
* ```
|
|
4222
|
+
* ```ts
|
|
4223
4223
|
* [
|
|
4224
4224
|
* {path: 'base', title: 'base', children: [
|
|
4225
4225
|
* {path: 'child', title: 'child'},
|
|
@@ -4411,7 +4411,7 @@ export declare abstract class UrlHandlingStrategy {
|
|
|
4411
4411
|
*
|
|
4412
4412
|
* The following example implementation matches HTML files.
|
|
4413
4413
|
*
|
|
4414
|
-
* ```
|
|
4414
|
+
* ```ts
|
|
4415
4415
|
* export function htmlFiles(url: UrlSegment[]) {
|
|
4416
4416
|
* return url.length === 1 && url[0].path.endsWith('.html') ? ({consumed: url}) : null;
|
|
4417
4417
|
* }
|
|
@@ -4450,7 +4450,7 @@ export declare type UrlMatchResult = {
|
|
|
4450
4450
|
* @usageNotes
|
|
4451
4451
|
* ### Example
|
|
4452
4452
|
*
|
|
4453
|
-
* ```
|
|
4453
|
+
* ```ts
|
|
4454
4454
|
* @Component({templateUrl:'template.html'})
|
|
4455
4455
|
* class MyComponent {
|
|
4456
4456
|
* constructor(router: Router) {
|
|
@@ -4550,7 +4550,7 @@ export declare abstract class UrlSerializer {
|
|
|
4550
4550
|
* @usageNotes
|
|
4551
4551
|
* ### Example
|
|
4552
4552
|
*
|
|
4553
|
-
* ```
|
|
4553
|
+
* ```ts
|
|
4554
4554
|
* @Component({templateUrl:'template.html'})
|
|
4555
4555
|
* class MyComponent {
|
|
4556
4556
|
* constructor(router: Router) {
|
|
@@ -4670,7 +4670,7 @@ export declare interface ViewTransitionsFeatureOptions {
|
|
|
4670
4670
|
* @usageNotes
|
|
4671
4671
|
*
|
|
4672
4672
|
* Basic example of how you can enable the feature:
|
|
4673
|
-
* ```
|
|
4673
|
+
* ```ts
|
|
4674
4674
|
* const appRoutes: Routes = [];
|
|
4675
4675
|
* bootstrapApplication(AppComponent,
|
|
4676
4676
|
* {
|
|
@@ -4710,7 +4710,7 @@ export declare function withComponentInputBinding(): ComponentInputBindingFeatur
|
|
|
4710
4710
|
* @usageNotes
|
|
4711
4711
|
*
|
|
4712
4712
|
* Basic example of how you can enable debug tracing:
|
|
4713
|
-
* ```
|
|
4713
|
+
* ```ts
|
|
4714
4714
|
* const appRoutes: Routes = [];
|
|
4715
4715
|
* bootstrapApplication(AppComponent,
|
|
4716
4716
|
* {
|
|
@@ -4738,7 +4738,7 @@ export declare function withDebugTracing(): DebugTracingFeature;
|
|
|
4738
4738
|
* @usageNotes
|
|
4739
4739
|
*
|
|
4740
4740
|
* Basic example of how you can disable initial navigation:
|
|
4741
|
-
* ```
|
|
4741
|
+
* ```ts
|
|
4742
4742
|
* const appRoutes: Routes = [];
|
|
4743
4743
|
* bootstrapApplication(AppComponent,
|
|
4744
4744
|
* {
|
|
@@ -4767,7 +4767,7 @@ export declare function withDisabledInitialNavigation(): DisabledInitialNavigati
|
|
|
4767
4767
|
* @usageNotes
|
|
4768
4768
|
*
|
|
4769
4769
|
* Basic example of how you can enable this navigation behavior:
|
|
4770
|
-
* ```
|
|
4770
|
+
* ```ts
|
|
4771
4771
|
* const appRoutes: Routes = [];
|
|
4772
4772
|
* bootstrapApplication(AppComponent,
|
|
4773
4773
|
* {
|
|
@@ -4791,7 +4791,7 @@ export declare function withEnabledBlockingInitialNavigation(): EnabledBlockingI
|
|
|
4791
4791
|
* @usageNotes
|
|
4792
4792
|
*
|
|
4793
4793
|
* Basic example of how you can use the hash location option:
|
|
4794
|
-
* ```
|
|
4794
|
+
* ```ts
|
|
4795
4795
|
* const appRoutes: Routes = [];
|
|
4796
4796
|
* bootstrapApplication(AppComponent,
|
|
4797
4797
|
* {
|
|
@@ -4817,7 +4817,7 @@ export declare function withHashLocation(): RouterHashLocationFeature;
|
|
|
4817
4817
|
* @usageNotes
|
|
4818
4818
|
*
|
|
4819
4819
|
* Basic example of how you can enable scrolling feature:
|
|
4820
|
-
* ```
|
|
4820
|
+
* ```ts
|
|
4821
4821
|
* const appRoutes: Routes = [];
|
|
4822
4822
|
* bootstrapApplication(AppComponent,
|
|
4823
4823
|
* {
|
|
@@ -4853,7 +4853,7 @@ export declare function withInMemoryScrolling(options?: InMemoryScrollingOptions
|
|
|
4853
4853
|
* @usageNotes
|
|
4854
4854
|
*
|
|
4855
4855
|
* Basic example of how you can use the error handler option:
|
|
4856
|
-
* ```
|
|
4856
|
+
* ```ts
|
|
4857
4857
|
* const appRoutes: Routes = [];
|
|
4858
4858
|
* bootstrapApplication(AppComponent,
|
|
4859
4859
|
* {
|
|
@@ -4882,7 +4882,7 @@ export declare function withNavigationErrorHandler(handler: (error: NavigationEr
|
|
|
4882
4882
|
* @usageNotes
|
|
4883
4883
|
*
|
|
4884
4884
|
* Basic example of how you can configure preloading:
|
|
4885
|
-
* ```
|
|
4885
|
+
* ```ts
|
|
4886
4886
|
* const appRoutes: Routes = [];
|
|
4887
4887
|
* bootstrapApplication(AppComponent,
|
|
4888
4888
|
* {
|
|
@@ -4909,7 +4909,7 @@ export declare function withPreloading(preloadingStrategy: Type<PreloadingStrate
|
|
|
4909
4909
|
* @usageNotes
|
|
4910
4910
|
*
|
|
4911
4911
|
* Basic example of how you can provide extra configuration options:
|
|
4912
|
-
* ```
|
|
4912
|
+
* ```ts
|
|
4913
4913
|
* const appRoutes: Routes = [];
|
|
4914
4914
|
* bootstrapApplication(AppComponent,
|
|
4915
4915
|
* {
|
|
@@ -4943,7 +4943,7 @@ export declare function withRouterConfig(options: RouterConfigOptions): RouterCo
|
|
|
4943
4943
|
* @usageNotes
|
|
4944
4944
|
*
|
|
4945
4945
|
* Basic example of how you can enable the feature:
|
|
4946
|
-
* ```
|
|
4946
|
+
* ```ts
|
|
4947
4947
|
* const appRoutes: Routes = [];
|
|
4948
4948
|
* bootstrapApplication(AppComponent,
|
|
4949
4949
|
* {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/router",
|
|
3
|
-
"version": "19.1.0-next.
|
|
3
|
+
"version": "19.1.0-next.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": "19.1.0-next.
|
|
28
|
-
"@angular/common": "19.1.0-next.
|
|
29
|
-
"@angular/platform-browser": "19.1.0-next.
|
|
27
|
+
"@angular/core": "19.1.0-next.2",
|
|
28
|
+
"@angular/common": "19.1.0-next.2",
|
|
29
|
+
"@angular/platform-browser": "19.1.0-next.2",
|
|
30
30
|
"rxjs": "^6.5.3 || ^7.4.0"
|
|
31
31
|
},
|
|
32
32
|
"ng-update": {
|
package/testing/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v19.1.0-next.
|
|
2
|
+
* @license Angular v19.1.0-next.2
|
|
3
3
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -97,7 +97,7 @@ export declare class RouterTestingHarness {
|
|
|
97
97
|
* @usageNotes
|
|
98
98
|
* ### Example
|
|
99
99
|
*
|
|
100
|
-
* ```
|
|
100
|
+
* ```ts
|
|
101
101
|
* beforeEach(() => {
|
|
102
102
|
* TestBed.configureTestingModule({
|
|
103
103
|
* imports: [
|
package/upgrade/index.d.ts
CHANGED