@angular/router 19.0.6 → 19.0.7
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 +79 -79
- package/fesm2022/router.mjs.map +1 -1
- package/fesm2022/testing.mjs +11 -11
- package/fesm2022/upgrade.mjs +1 -1
- package/index.d.ts +14 -18
- package/package.json +4 -4
- package/testing/index.d.ts +1 -1
- package/upgrade/index.d.ts +1 -1
package/fesm2022/testing.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v19.0.
|
|
2
|
+
* @license Angular v19.0.7
|
|
3
3
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -59,16 +59,16 @@ class RouterTestingModule {
|
|
|
59
59
|
],
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
63
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.
|
|
64
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.
|
|
62
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: RouterTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
63
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.7", ngImport: i0, type: RouterTestingModule, exports: [RouterModule] });
|
|
64
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: RouterTestingModule, providers: [
|
|
65
65
|
ɵROUTER_PROVIDERS,
|
|
66
66
|
provideLocationMocks(),
|
|
67
67
|
withPreloading(NoPreloading).ɵproviders,
|
|
68
68
|
{ provide: ROUTES, multi: true, useValue: [] },
|
|
69
69
|
], imports: [RouterModule] });
|
|
70
70
|
}
|
|
71
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
71
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: RouterTestingModule, decorators: [{
|
|
72
72
|
type: NgModule,
|
|
73
73
|
args: [{
|
|
74
74
|
exports: [RouterModule],
|
|
@@ -99,20 +99,20 @@ class RootFixtureService {
|
|
|
99
99
|
this.fixture.detectChanges();
|
|
100
100
|
return this.fixture;
|
|
101
101
|
}
|
|
102
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
103
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.
|
|
102
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: RootFixtureService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
103
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: RootFixtureService, providedIn: 'root' });
|
|
104
104
|
}
|
|
105
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
105
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: RootFixtureService, decorators: [{
|
|
106
106
|
type: Injectable,
|
|
107
107
|
args: [{ providedIn: 'root' }]
|
|
108
108
|
}] });
|
|
109
109
|
class RootCmp {
|
|
110
110
|
outlet;
|
|
111
111
|
routerOutletData = signal(undefined);
|
|
112
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
113
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.
|
|
112
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: RootCmp, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
113
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.7", type: RootCmp, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "outlet", first: true, predicate: RouterOutlet, descendants: true }], ngImport: i0, template: '<router-outlet [routerOutletData]="routerOutletData()"></router-outlet>', isInline: true, dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] });
|
|
114
114
|
}
|
|
115
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
115
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: RootCmp, decorators: [{
|
|
116
116
|
type: Component,
|
|
117
117
|
args: [{
|
|
118
118
|
template: '<router-outlet [routerOutletData]="routerOutletData()"></router-outlet>',
|
package/fesm2022/upgrade.mjs
CHANGED
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v19.0.
|
|
2
|
+
* @license Angular v19.0.7
|
|
3
3
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -131,7 +131,7 @@ export declare class ActivatedRouteSnapshot {
|
|
|
131
131
|
* You can compute all params (or data) in the router state or to get params outside
|
|
132
132
|
* of an activated component by traversing the `RouterState` tree as in the following
|
|
133
133
|
* example:
|
|
134
|
-
* ```
|
|
134
|
+
* ```ts
|
|
135
135
|
* collectRouteParams(router: Router) {
|
|
136
136
|
* let params = {};
|
|
137
137
|
* let stack: ActivatedRouteSnapshot[] = [router.routerState.snapshot.root];
|
|
@@ -462,8 +462,7 @@ export declare type CanActivateFn = (route: ActivatedRouteSnapshot, state: Route
|
|
|
462
462
|
* Here, the defined guard function is provided as part of the `Route` object
|
|
463
463
|
* in the router configuration:
|
|
464
464
|
*
|
|
465
|
-
* ```
|
|
466
|
-
*
|
|
465
|
+
* ```ts
|
|
467
466
|
* @Injectable()
|
|
468
467
|
* class CanDeactivateTeam implements CanDeactivate<TeamComponent> {
|
|
469
468
|
* constructor(private permissions: Permissions, private currentUser: UserToken) {}
|
|
@@ -549,8 +548,7 @@ export declare type CanDeactivateFn<T> = (component: T, currentRoute: ActivatedR
|
|
|
549
548
|
* Here, the defined guard function is provided as part of the `Route` object
|
|
550
549
|
* in the router configuration:
|
|
551
550
|
*
|
|
552
|
-
* ```
|
|
553
|
-
*
|
|
551
|
+
* ```ts
|
|
554
552
|
* @NgModule({
|
|
555
553
|
* imports: [
|
|
556
554
|
* RouterModule.forRoot([
|
|
@@ -618,8 +616,7 @@ export declare type CanLoadFn = (route: Route, segments: UrlSegment[]) => MaybeA
|
|
|
618
616
|
* Here, the defined guard function is provided as part of the `Route` object
|
|
619
617
|
* in the router configuration:
|
|
620
618
|
*
|
|
621
|
-
* ```
|
|
622
|
-
*
|
|
619
|
+
* ```ts
|
|
623
620
|
* @NgModule({
|
|
624
621
|
* imports: [
|
|
625
622
|
* RouterModule.forRoot([
|
|
@@ -1600,7 +1597,7 @@ export declare interface NavigationBehaviorOptions {
|
|
|
1600
1597
|
* This feature is useful for redirects, such as redirecting to an error page, without changing
|
|
1601
1598
|
* the value that will be displayed in the browser's address bar.
|
|
1602
1599
|
*
|
|
1603
|
-
* ```
|
|
1600
|
+
* ```ts
|
|
1604
1601
|
* const canActivate: CanActivateFn = (route: ActivatedRouteSnapshot) => {
|
|
1605
1602
|
* const userService = inject(UserService);
|
|
1606
1603
|
* const router = inject(Router);
|
|
@@ -2213,8 +2210,7 @@ export declare type RedirectFunction = (redirectData: Pick<ActivatedRouteSnapsho
|
|
|
2213
2210
|
* Here, the defined `resolve()` function is provided as part of the `Route` object
|
|
2214
2211
|
* in the router configuration:
|
|
2215
2212
|
*
|
|
2216
|
-
* ```
|
|
2217
|
-
|
|
2213
|
+
* ```ts
|
|
2218
2214
|
* @NgModule({
|
|
2219
2215
|
* imports: [
|
|
2220
2216
|
* RouterModule.forRoot([
|
|
@@ -3008,7 +3004,7 @@ export declare class Router {
|
|
|
3008
3004
|
*
|
|
3009
3005
|
* @usageNotes
|
|
3010
3006
|
*
|
|
3011
|
-
* ```
|
|
3007
|
+
* ```ts
|
|
3012
3008
|
* router.resetConfig([
|
|
3013
3009
|
* { path: 'team/:id', component: TeamCmp, children: [
|
|
3014
3010
|
* { path: 'simple', component: SimpleCmp },
|
|
@@ -3085,7 +3081,7 @@ export declare class Router {
|
|
|
3085
3081
|
*
|
|
3086
3082
|
* The following calls request navigation to an absolute path.
|
|
3087
3083
|
*
|
|
3088
|
-
* ```
|
|
3084
|
+
* ```ts
|
|
3089
3085
|
* router.navigateByUrl("/team/33/user/11");
|
|
3090
3086
|
*
|
|
3091
3087
|
* // Navigate without updating the URL
|
|
@@ -3116,7 +3112,7 @@ export declare class Router {
|
|
|
3116
3112
|
*
|
|
3117
3113
|
* The following calls request navigation to a dynamic route path relative to the current URL.
|
|
3118
3114
|
*
|
|
3119
|
-
* ```
|
|
3115
|
+
* ```ts
|
|
3120
3116
|
* router.navigate(['team', 33, 'user', 11], {relativeTo: route});
|
|
3121
3117
|
*
|
|
3122
3118
|
* // Navigate without updating the URL, overriding the default behavior
|
|
@@ -3738,7 +3734,7 @@ export declare class RouterLinkActive implements OnChanges, OnDestroy, AfterCont
|
|
|
3738
3734
|
* true -> Route is active
|
|
3739
3735
|
* false -> Route is inactive
|
|
3740
3736
|
*
|
|
3741
|
-
* ```
|
|
3737
|
+
* ```html
|
|
3742
3738
|
* <a
|
|
3743
3739
|
* routerLink="/user/bob"
|
|
3744
3740
|
* routerLinkActive="active-link"
|
|
@@ -3791,7 +3787,7 @@ export declare class RouterModule {
|
|
|
3791
3787
|
*
|
|
3792
3788
|
* When registering the NgModule at the root, import as follows:
|
|
3793
3789
|
*
|
|
3794
|
-
* ```
|
|
3790
|
+
* ```ts
|
|
3795
3791
|
* @NgModule({
|
|
3796
3792
|
* imports: [RouterModule.forRoot(ROUTES)]
|
|
3797
3793
|
* })
|
|
@@ -3809,7 +3805,7 @@ export declare class RouterModule {
|
|
|
3809
3805
|
* without creating a new Router service.
|
|
3810
3806
|
* When registering for submodules and lazy-loaded submodules, create the NgModule as follows:
|
|
3811
3807
|
*
|
|
3812
|
-
* ```
|
|
3808
|
+
* ```ts
|
|
3813
3809
|
* @NgModule({
|
|
3814
3810
|
* imports: [RouterModule.forChild(ROUTES)]
|
|
3815
3811
|
* })
|
|
@@ -4302,7 +4298,7 @@ export declare interface UrlCreationOptions {
|
|
|
4302
4298
|
* The following `go()` function navigates to the `list` route by
|
|
4303
4299
|
* interpreting the destination URI as relative to the activated `child` route
|
|
4304
4300
|
*
|
|
4305
|
-
* ```
|
|
4301
|
+
* ```ts
|
|
4306
4302
|
* @Component({...})
|
|
4307
4303
|
* class ChildComponent {
|
|
4308
4304
|
* constructor(private router: Router, private route: ActivatedRoute) {}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/router",
|
|
3
|
-
"version": "19.0.
|
|
3
|
+
"version": "19.0.7",
|
|
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.0.
|
|
28
|
-
"@angular/common": "19.0.
|
|
29
|
-
"@angular/platform-browser": "19.0.
|
|
27
|
+
"@angular/core": "19.0.7",
|
|
28
|
+
"@angular/common": "19.0.7",
|
|
29
|
+
"@angular/platform-browser": "19.0.7",
|
|
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