@angular/router 16.2.0-next.0 → 16.2.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/esm2022/src/components/empty_outlet.mjs +3 -3
- package/esm2022/src/directives/router_link.mjs +3 -3
- package/esm2022/src/directives/router_link_active.mjs +3 -3
- package/esm2022/src/directives/router_outlet.mjs +6 -6
- package/esm2022/src/models.mjs +1 -1
- package/esm2022/src/navigation_transition.mjs +3 -3
- package/esm2022/src/page_title_strategy.mjs +6 -6
- package/esm2022/src/provide_router.mjs +4 -3
- package/esm2022/src/route_reuse_strategy.mjs +6 -6
- package/esm2022/src/router.mjs +3 -3
- package/esm2022/src/router_config_loader.mjs +3 -3
- package/esm2022/src/router_module.mjs +4 -4
- package/esm2022/src/router_outlet_context.mjs +3 -3
- package/esm2022/src/router_preloader.mjs +9 -9
- package/esm2022/src/router_scroller.mjs +3 -3
- package/esm2022/src/url_handling_strategy.mjs +6 -6
- package/esm2022/src/url_tree.mjs +3 -3
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/router_testing_harness.mjs +6 -6
- package/esm2022/testing/src/router_testing_module.mjs +4 -4
- package/fesm2022/router.mjs +69 -68
- package/fesm2022/router.mjs.map +1 -1
- package/fesm2022/testing.mjs +11 -11
- package/fesm2022/upgrade.mjs +1 -1
- package/index.d.ts +17 -14
- 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 v16.2.0-next.
|
|
2
|
+
* @license Angular v16.2.0-next.2
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -109,16 +109,16 @@ class RouterTestingModule {
|
|
|
109
109
|
]
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0-next.
|
|
113
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.0-next.
|
|
114
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.0-next.
|
|
112
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0-next.2", ngImport: i0, type: RouterTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
113
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.0-next.2", ngImport: i0, type: RouterTestingModule, exports: [RouterModule] }); }
|
|
114
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.0-next.2", ngImport: i0, type: RouterTestingModule, providers: [
|
|
115
115
|
ɵROUTER_PROVIDERS,
|
|
116
116
|
provideLocationMocks(),
|
|
117
117
|
withPreloading(NoPreloading).ɵproviders,
|
|
118
118
|
{ provide: ROUTES, multi: true, useValue: [] },
|
|
119
119
|
], imports: [RouterModule] }); }
|
|
120
120
|
}
|
|
121
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0-next.
|
|
121
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0-next.2", ngImport: i0, type: RouterTestingModule, decorators: [{
|
|
122
122
|
type: NgModule,
|
|
123
123
|
args: [{
|
|
124
124
|
exports: [RouterModule],
|
|
@@ -147,18 +147,18 @@ class RootFixtureService {
|
|
|
147
147
|
this.fixture.detectChanges();
|
|
148
148
|
return this.fixture;
|
|
149
149
|
}
|
|
150
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0-next.
|
|
151
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.0-next.
|
|
150
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0-next.2", ngImport: i0, type: RootFixtureService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
151
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.0-next.2", ngImport: i0, type: RootFixtureService, providedIn: 'root' }); }
|
|
152
152
|
}
|
|
153
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0-next.
|
|
153
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0-next.2", ngImport: i0, type: RootFixtureService, decorators: [{
|
|
154
154
|
type: Injectable,
|
|
155
155
|
args: [{ providedIn: 'root' }]
|
|
156
156
|
}] });
|
|
157
157
|
class RootCmp {
|
|
158
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0-next.
|
|
159
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0-next.
|
|
158
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0-next.2", ngImport: i0, type: RootCmp, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
159
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0-next.2", type: RootCmp, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "outlet", first: true, predicate: RouterOutlet, descendants: true }], ngImport: i0, template: '<router-outlet></router-outlet>', isInline: true, dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] }); }
|
|
160
160
|
}
|
|
161
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0-next.
|
|
161
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0-next.2", ngImport: i0, type: RootCmp, decorators: [{
|
|
162
162
|
type: Component,
|
|
163
163
|
args: [{
|
|
164
164
|
standalone: true,
|
package/fesm2022/upgrade.mjs
CHANGED
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v16.2.0-next.
|
|
2
|
+
* @license Angular v16.2.0-next.2
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -299,8 +299,8 @@ export declare abstract class BaseRouteReuseStrategy implements RouteReuseStrate
|
|
|
299
299
|
*
|
|
300
300
|
* @publicApi
|
|
301
301
|
* @deprecated Class-based `Route` guards are deprecated in favor of functional guards. An
|
|
302
|
-
* injectable class can be used as a functional guard using the `inject`
|
|
303
|
-
*
|
|
302
|
+
* injectable class can be used as a functional guard using the [`inject`](api/core/inject)
|
|
303
|
+
* function: `canActivate: [() => inject(myGuard).canActivate()]`.
|
|
304
304
|
* @see {@link CanActivateFn}
|
|
305
305
|
*/
|
|
306
306
|
export declare interface CanActivate {
|
|
@@ -365,8 +365,8 @@ export declare interface CanActivate {
|
|
|
365
365
|
*
|
|
366
366
|
* @publicApi
|
|
367
367
|
* @deprecated Class-based `Route` guards are deprecated in favor of functional guards. An
|
|
368
|
-
* injectable class can be used as a functional guard using the `inject`
|
|
369
|
-
*
|
|
368
|
+
* injectable class can be used as a functional guard using the [`inject`](api/core/inject)
|
|
369
|
+
* function: `canActivateChild: [() => inject(myGuard).canActivateChild()]`.
|
|
370
370
|
* @see {@link CanActivateChildFn}
|
|
371
371
|
*/
|
|
372
372
|
export declare interface CanActivateChild {
|
|
@@ -468,8 +468,8 @@ export declare type CanActivateFn = (route: ActivatedRouteSnapshot, state: Route
|
|
|
468
468
|
*
|
|
469
469
|
* @publicApi
|
|
470
470
|
* @deprecated Class-based `Route` guards are deprecated in favor of functional guards. An
|
|
471
|
-
* injectable class can be used as a functional guard using the `inject`
|
|
472
|
-
*
|
|
471
|
+
* injectable class can be used as a functional guard using the [`inject`](api/core/inject)
|
|
472
|
+
* function: `canDeactivate: [() => inject(myGuard).canDeactivate()]`.
|
|
473
473
|
* @see {@link CanDeactivateFn}
|
|
474
474
|
*/
|
|
475
475
|
export declare interface CanDeactivate<T> {
|
|
@@ -623,8 +623,8 @@ export declare type CanLoadFn = (route: Route, segments: UrlSegment[]) => Observ
|
|
|
623
623
|
*
|
|
624
624
|
* @publicApi
|
|
625
625
|
* @deprecated Class-based `Route` guards are deprecated in favor of functional guards. An
|
|
626
|
-
* injectable class can be used as a functional guard using the `inject`
|
|
627
|
-
*
|
|
626
|
+
* injectable class can be used as a functional guard using the [`inject`](api/core/inject)
|
|
627
|
+
* function: `canMatch: [() => inject(myGuard).canMatch()]`.
|
|
628
628
|
* @see {@link CanMatchFn}
|
|
629
629
|
*/
|
|
630
630
|
export declare interface CanMatch {
|
|
@@ -881,8 +881,9 @@ export declare class DefaultUrlSerializer implements UrlSerializer {
|
|
|
881
881
|
/**
|
|
882
882
|
* The `InjectionToken` and `@Injectable` classes for guards and resolvers are deprecated in favor
|
|
883
883
|
* of plain JavaScript functions instead.. Dependency injection can still be achieved using the
|
|
884
|
-
* `inject` function from `@angular/core` and an injectable class can be used as
|
|
885
|
-
* using `inject
|
|
884
|
+
* [`inject`](api/core/inject) function from `@angular/core` and an injectable class can be used as
|
|
885
|
+
* a functional guard using [`inject`](api/core/inject): `canActivate: [() =>
|
|
886
|
+
* inject(myGuard).canActivate()]`.
|
|
886
887
|
*
|
|
887
888
|
* @deprecated
|
|
888
889
|
* @see {@link CanMatchFn}
|
|
@@ -2130,7 +2131,8 @@ export declare type QueryParamsHandling = 'merge' | 'preserve' | '';
|
|
|
2130
2131
|
*
|
|
2131
2132
|
* @publicApi
|
|
2132
2133
|
* @deprecated Class-based `Route` resolvers are deprecated in favor of functional resolvers. An
|
|
2133
|
-
* injectable class can be used as a functional guard using the `inject`
|
|
2134
|
+
* injectable class can be used as a functional guard using the [`inject`](api/core/inject)
|
|
2135
|
+
function: `resolve:
|
|
2134
2136
|
* {'user': () => inject(UserResolver).resolve()}`.
|
|
2135
2137
|
* @see {@link ResolveFn}
|
|
2136
2138
|
*/
|
|
@@ -4568,7 +4570,8 @@ export declare function withInMemoryScrolling(options?: InMemoryScrollingOptions
|
|
|
4568
4570
|
* Subscribes to the Router's navigation events and calls the given function when a
|
|
4569
4571
|
* `NavigationError` happens.
|
|
4570
4572
|
*
|
|
4571
|
-
* This function is run inside application's injection context
|
|
4573
|
+
* This function is run inside application's [injection context](guide/dependency-injection-context)
|
|
4574
|
+
* so you can use the [`inject`](api/core/inject) function.
|
|
4572
4575
|
*
|
|
4573
4576
|
* @usageNotes
|
|
4574
4577
|
*
|
|
@@ -4587,7 +4590,7 @@ export declare function withInMemoryScrolling(options?: InMemoryScrollingOptions
|
|
|
4587
4590
|
*
|
|
4588
4591
|
* @see {@link NavigationError}
|
|
4589
4592
|
* @see {@link core/inject}
|
|
4590
|
-
* @see {@link
|
|
4593
|
+
* @see {@link runInInjectionContext}
|
|
4591
4594
|
*
|
|
4592
4595
|
* @returns A set of providers for use with `provideRouter`.
|
|
4593
4596
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/router",
|
|
3
|
-
"version": "16.2.0-next.
|
|
3
|
+
"version": "16.2.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": "16.2.0-next.
|
|
28
|
-
"@angular/common": "16.2.0-next.
|
|
29
|
-
"@angular/platform-browser": "16.2.0-next.
|
|
27
|
+
"@angular/core": "16.2.0-next.2",
|
|
28
|
+
"@angular/common": "16.2.0-next.2",
|
|
29
|
+
"@angular/platform-browser": "16.2.0-next.2",
|
|
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