@angular/router 17.0.0-next.2 → 17.0.0-next.3
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/apply_redirects.mjs +8 -3
- 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/navigation_transition.mjs +13 -9
- package/esm2022/src/operators/resolve_data.mjs +2 -5
- package/esm2022/src/page_title_strategy.mjs +6 -6
- package/esm2022/src/recognize.mjs +34 -50
- package/esm2022/src/route_reuse_strategy.mjs +6 -6
- package/esm2022/src/router.mjs +57 -226
- 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/state_manager.mjs +244 -0
- package/esm2022/src/url_handling_strategy.mjs +6 -6
- package/esm2022/src/url_tree.mjs +3 -3
- package/esm2022/src/utils/collection.mjs +9 -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 +421 -366
- package/fesm2022/router.mjs.map +1 -1
- package/fesm2022/testing.mjs +11 -11
- package/fesm2022/upgrade.mjs +1 -1
- package/index.d.ts +16 -63
- 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 v17.0.0-next.
|
|
2
|
+
* @license Angular v17.0.0-next.3
|
|
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: "17.0.0-next.
|
|
113
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.0-next.
|
|
114
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.0-next.
|
|
112
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.3", ngImport: i0, type: RouterTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
113
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.0-next.3", ngImport: i0, type: RouterTestingModule, exports: [RouterModule] }); }
|
|
114
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.0-next.3", 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: "17.0.0-next.
|
|
121
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.3", 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: "17.0.0-next.
|
|
151
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.
|
|
150
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.3", ngImport: i0, type: RootFixtureService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
151
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.3", ngImport: i0, type: RootFixtureService, providedIn: 'root' }); }
|
|
152
152
|
}
|
|
153
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.
|
|
153
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.3", 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: "17.0.0-next.
|
|
159
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.0-next.
|
|
158
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.3", ngImport: i0, type: RootCmp, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
159
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.0-next.3", 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: "17.0.0-next.
|
|
161
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.3", 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 v17.0.0-next.
|
|
2
|
+
* @license Angular v17.0.0-next.3
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -27,6 +27,7 @@ import { Provider } from '@angular/core';
|
|
|
27
27
|
import { ProviderToken } from '@angular/core';
|
|
28
28
|
import { QueryList } from '@angular/core';
|
|
29
29
|
import { Renderer2 } from '@angular/core';
|
|
30
|
+
import { RouterState as RouterState_2 } from '@angular/router';
|
|
30
31
|
import { SimpleChanges } from '@angular/core';
|
|
31
32
|
import { Title } from '@angular/platform-browser';
|
|
32
33
|
import { Type } from '@angular/core';
|
|
@@ -2698,26 +2699,21 @@ declare class RoutedComponentInputBinder {
|
|
|
2698
2699
|
* @publicApi
|
|
2699
2700
|
*/
|
|
2700
2701
|
export declare class Router {
|
|
2702
|
+
private get currentUrlTree();
|
|
2703
|
+
private get rawUrlTree();
|
|
2704
|
+
private get browserUrlTree();
|
|
2701
2705
|
private disposed;
|
|
2702
2706
|
private locationSubscription?;
|
|
2703
|
-
private get navigationId();
|
|
2704
|
-
/**
|
|
2705
|
-
* The id of the currently active page in the router.
|
|
2706
|
-
* Updated to the transition's target id on a successful navigation.
|
|
2707
|
-
*
|
|
2708
|
-
* This is used to track what page the router last activated. When an attempted navigation fails,
|
|
2709
|
-
* the router can then use this to compute how to restore the state back to the previously active
|
|
2710
|
-
* page.
|
|
2711
|
-
*/
|
|
2712
|
-
private currentPageId;
|
|
2713
|
-
/**
|
|
2714
|
-
* The ɵrouterPageId of whatever page is currently active in the browser history. This is
|
|
2715
|
-
* important for computing the target page id for new navigations because we need to ensure each
|
|
2716
|
-
* page id in the browser history is 1 more than the previous entry.
|
|
2717
|
-
*/
|
|
2718
|
-
private get browserPageId();
|
|
2719
|
-
private console;
|
|
2720
2707
|
private isNgZoneEnabled;
|
|
2708
|
+
private readonly console;
|
|
2709
|
+
private readonly stateManager;
|
|
2710
|
+
private readonly options;
|
|
2711
|
+
private readonly pendingTasks;
|
|
2712
|
+
private readonly urlUpdateStrategy;
|
|
2713
|
+
private readonly navigationTransitions;
|
|
2714
|
+
private readonly urlSerializer;
|
|
2715
|
+
private readonly location;
|
|
2716
|
+
private readonly urlHandlingStrategy;
|
|
2721
2717
|
/**
|
|
2722
2718
|
* The private `Subject` type for the public events exposed in the getter. This is used internally
|
|
2723
2719
|
* to push events to. The separate field allows us to expose separate types in the public API
|
|
@@ -2731,9 +2727,7 @@ export declare class Router {
|
|
|
2731
2727
|
/**
|
|
2732
2728
|
* The current state of routing in this NgModule.
|
|
2733
2729
|
*/
|
|
2734
|
-
|
|
2735
|
-
private options;
|
|
2736
|
-
private pendingTasks;
|
|
2730
|
+
get routerState(): RouterState_2;
|
|
2737
2731
|
/**
|
|
2738
2732
|
* A handler for navigation errors in this NgModule.
|
|
2739
2733
|
*
|
|
@@ -2756,15 +2750,6 @@ export declare class Router {
|
|
|
2756
2750
|
* false otherwise.
|
|
2757
2751
|
*/
|
|
2758
2752
|
navigated: boolean;
|
|
2759
|
-
private lastSuccessfulId;
|
|
2760
|
-
/**
|
|
2761
|
-
* A strategy for extracting and merging URLs.
|
|
2762
|
-
* Used for AngularJS to Angular migrations.
|
|
2763
|
-
*
|
|
2764
|
-
* @deprecated Configure using `providers` instead:
|
|
2765
|
-
* `{provide: UrlHandlingStrategy, useClass: MyStrategy}`.
|
|
2766
|
-
*/
|
|
2767
|
-
urlHandlingStrategy: UrlHandlingStrategy;
|
|
2768
2753
|
/**
|
|
2769
2754
|
* A strategy for re-using routes.
|
|
2770
2755
|
*
|
|
@@ -2782,37 +2767,7 @@ export declare class Router {
|
|
|
2782
2767
|
* @see {@link RouterModule}
|
|
2783
2768
|
*/
|
|
2784
2769
|
onSameUrlNavigation: OnSameUrlNavigation;
|
|
2785
|
-
private urlUpdateStrategy;
|
|
2786
|
-
/**
|
|
2787
|
-
* Configures how the Router attempts to restore state when a navigation is cancelled.
|
|
2788
|
-
*
|
|
2789
|
-
* 'replace' - Always uses `location.replaceState` to set the browser state to the state of the
|
|
2790
|
-
* router before the navigation started. This means that if the URL of the browser is updated
|
|
2791
|
-
* _before_ the navigation is canceled, the Router will simply replace the item in history rather
|
|
2792
|
-
* than trying to restore to the previous location in the session history. This happens most
|
|
2793
|
-
* frequently with `urlUpdateStrategy: 'eager'` and navigations with the browser back/forward
|
|
2794
|
-
* buttons.
|
|
2795
|
-
*
|
|
2796
|
-
* 'computed' - Will attempt to return to the same index in the session history that corresponds
|
|
2797
|
-
* to the Angular route when the navigation gets cancelled. For example, if the browser back
|
|
2798
|
-
* button is clicked and the navigation is cancelled, the Router will trigger a forward navigation
|
|
2799
|
-
* and vice versa.
|
|
2800
|
-
*
|
|
2801
|
-
* Note: the 'computed' option is incompatible with any `UrlHandlingStrategy` which only
|
|
2802
|
-
* handles a portion of the URL because the history restoration navigates to the previous place in
|
|
2803
|
-
* the browser history rather than simply resetting a portion of the URL.
|
|
2804
|
-
*
|
|
2805
|
-
* The default value is `replace`.
|
|
2806
|
-
*
|
|
2807
|
-
* @see {@link withRouterConfig}
|
|
2808
|
-
* @see {@link provideRouter}
|
|
2809
|
-
* @see {@link RouterModule}
|
|
2810
|
-
*/
|
|
2811
|
-
private canceledNavigationResolution;
|
|
2812
2770
|
config: Routes;
|
|
2813
|
-
private readonly navigationTransitions;
|
|
2814
|
-
private readonly urlSerializer;
|
|
2815
|
-
private readonly location;
|
|
2816
2771
|
/**
|
|
2817
2772
|
* Indicates whether the application has opted in to binding Router data to component inputs.
|
|
2818
2773
|
*
|
|
@@ -3000,9 +2955,7 @@ export declare class Router {
|
|
|
3000
2955
|
*/
|
|
3001
2956
|
isActive(url: string | UrlTree, matchOptions: IsActiveMatchOptions): boolean;
|
|
3002
2957
|
private removeEmptyProps;
|
|
3003
|
-
private
|
|
3004
|
-
private resetUrlToCurrentUrlTree;
|
|
3005
|
-
private generateNgRouterState;
|
|
2958
|
+
private scheduleNavigation;
|
|
3006
2959
|
static ɵfac: i0.ɵɵFactoryDeclaration<Router, never>;
|
|
3007
2960
|
static ɵprov: i0.ɵɵInjectableDeclaration<Router>;
|
|
3008
2961
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/router",
|
|
3
|
-
"version": "17.0.0-next.
|
|
3
|
+
"version": "17.0.0-next.3",
|
|
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": "17.0.0-next.
|
|
28
|
-
"@angular/common": "17.0.0-next.
|
|
29
|
-
"@angular/platform-browser": "17.0.0-next.
|
|
27
|
+
"@angular/core": "17.0.0-next.3",
|
|
28
|
+
"@angular/common": "17.0.0-next.3",
|
|
29
|
+
"@angular/platform-browser": "17.0.0-next.3",
|
|
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