@angular/router 20.0.0-next.0 → 20.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/router",
3
- "version": "20.0.0-next.0",
3
+ "version": "20.0.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": "20.0.0-next.0",
28
- "@angular/common": "20.0.0-next.0",
29
- "@angular/platform-browser": "20.0.0-next.0",
27
+ "@angular/core": "20.0.0-next.2",
28
+ "@angular/common": "20.0.0-next.2",
29
+ "@angular/platform-browser": "20.0.0-next.2",
30
30
  "rxjs": "^6.5.3 || ^7.4.0"
31
31
  },
32
32
  "ng-update": {
@@ -1,19 +1,51 @@
1
1
  /**
2
- * @license Angular v20.0.0-next.0
3
- * (c) 2010-2024 Google LLC. https://angular.io/
2
+ * @license Angular v20.0.0-next.2
3
+ * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
6
 
7
-
8
- import { ComponentFixture } from '@angular/core/testing';
9
- import { DebugElement } from '@angular/core';
10
- import { ExtraOptions } from '@angular/router';
11
7
  import * as i0 from '@angular/core';
12
- import * as i1 from '@angular/router';
13
- import { ModuleWithProviders } from '@angular/core';
14
- import { Routes } from '@angular/router';
15
- import { Type } from '@angular/core';
16
- import { WritableSignal } from '@angular/core';
8
+ import { ModuleWithProviders, WritableSignal, DebugElement, Type } from '@angular/core';
9
+ import * as _angular_router from '@angular/router';
10
+ import { Routes, ExtraOptions } from '@angular/router';
11
+ import { ComponentFixture } from '@angular/core/testing';
12
+
13
+ /**
14
+ * @description
15
+ *
16
+ * Sets up the router to be used for testing.
17
+ *
18
+ * The modules sets up the router to be used for testing.
19
+ * It provides spy implementations of `Location` and `LocationStrategy`.
20
+ *
21
+ * @usageNotes
22
+ * ### Example
23
+ *
24
+ * ```ts
25
+ * beforeEach(() => {
26
+ * TestBed.configureTestingModule({
27
+ * imports: [
28
+ * RouterModule.forRoot(
29
+ * [{path: '', component: BlankCmp}, {path: 'simple', component: SimpleCmp}]
30
+ * )
31
+ * ]
32
+ * });
33
+ * });
34
+ * ```
35
+ *
36
+ * @publicApi
37
+ * @deprecated Use `provideRouter` or `RouterModule`/`RouterModule.forRoot` instead.
38
+ * This module was previously used to provide a helpful collection of test fakes,
39
+ * most notably those for `Location` and `LocationStrategy`. These are generally not
40
+ * required anymore, as `MockPlatformLocation` is provided in `TestBed` by default.
41
+ * However, you can use them directly with `provideLocationMocks`.
42
+ */
43
+ declare class RouterTestingModule {
44
+ static withRoutes(routes: Routes, config?: ExtraOptions): ModuleWithProviders<RouterTestingModule>;
45
+ static ɵfac: i0.ɵɵFactoryDeclaration<RouterTestingModule, never>;
46
+ static ɵmod: i0.ɵɵNgModuleDeclaration<RouterTestingModule, never, never, [typeof _angular_router.RouterModule]>;
47
+ static ɵinj: i0.ɵɵInjectorDeclaration<RouterTestingModule>;
48
+ }
17
49
 
18
50
  /**
19
51
  * A testing harness for the `Router` to reduce the boilerplate needed to test routes and routed
@@ -21,7 +53,7 @@ import { WritableSignal } from '@angular/core';
21
53
  *
22
54
  * @publicApi
23
55
  */
24
- export declare class RouterTestingHarness {
56
+ declare class RouterTestingHarness {
25
57
  /**
26
58
  * Creates a `RouterTestingHarness` instance.
27
59
  *
@@ -86,41 +118,4 @@ export declare class RouterTestingHarness {
86
118
  navigateByUrl<T>(url: string, requiredRoutedComponentType: Type<T>): Promise<T>;
87
119
  }
88
120
 
89
- /**
90
- * @description
91
- *
92
- * Sets up the router to be used for testing.
93
- *
94
- * The modules sets up the router to be used for testing.
95
- * It provides spy implementations of `Location` and `LocationStrategy`.
96
- *
97
- * @usageNotes
98
- * ### Example
99
- *
100
- * ```ts
101
- * beforeEach(() => {
102
- * TestBed.configureTestingModule({
103
- * imports: [
104
- * RouterModule.forRoot(
105
- * [{path: '', component: BlankCmp}, {path: 'simple', component: SimpleCmp}]
106
- * )
107
- * ]
108
- * });
109
- * });
110
- * ```
111
- *
112
- * @publicApi
113
- * @deprecated Use `provideRouter` or `RouterModule`/`RouterModule.forRoot` instead.
114
- * This module was previously used to provide a helpful collection of test fakes,
115
- * most notably those for `Location` and `LocationStrategy`. These are generally not
116
- * required anymore, as `MockPlatformLocation` is provided in `TestBed` by default.
117
- * However, you can use them directly with `provideLocationMocks`.
118
- */
119
- export declare class RouterTestingModule {
120
- static withRoutes(routes: Routes, config?: ExtraOptions): ModuleWithProviders<RouterTestingModule>;
121
- static ɵfac: i0.ɵɵFactoryDeclaration<RouterTestingModule, never>;
122
- static ɵmod: i0.ɵɵNgModuleDeclaration<RouterTestingModule, never, never, [typeof i1.RouterModule]>;
123
- static ɵinj: i0.ɵɵInjectorDeclaration<RouterTestingModule>;
124
- }
125
-
126
- export { }
121
+ export { RouterTestingHarness, RouterTestingModule };
@@ -1,12 +1,10 @@
1
1
  /**
2
- * @license Angular v20.0.0-next.0
3
- * (c) 2010-2024 Google LLC. https://angular.io/
2
+ * @license Angular v20.0.0-next.2
3
+ * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
6
 
7
-
8
- import { ComponentRef } from '@angular/core';
9
- import { InjectionToken } from '@angular/core';
7
+ import { InjectionToken, ComponentRef } from '@angular/core';
10
8
  import { UpgradeModule } from '@angular/upgrade/static';
11
9
 
12
10
  /**
@@ -32,13 +30,12 @@ import { UpgradeModule } from '@angular/upgrade/static';
32
30
  *
33
31
  * @publicApi
34
32
  */
35
- export declare const RouterUpgradeInitializer: {
33
+ declare const RouterUpgradeInitializer: {
36
34
  provide: InjectionToken<readonly ((compRef: ComponentRef<any>) => void)[]>;
37
35
  multi: boolean;
38
36
  useFactory: (ngUpgrade: UpgradeModule) => () => void;
39
37
  deps: (typeof UpgradeModule)[];
40
38
  };
41
-
42
39
  /**
43
40
  * Sets up a location change listener to trigger `history.pushState`.
44
41
  * Works around the problem that `onPopState` does not trigger `history.pushState`.
@@ -46,11 +43,11 @@ export declare const RouterUpgradeInitializer: {
46
43
  *
47
44
  * @param ngUpgrade The upgrade NgModule.
48
45
  * @param urlType The location strategy.
49
- * @see {@link HashLocationStrategy}
50
- * @see {@link PathLocationStrategy}
46
+ * @see {@link /api/common/HashLocationStrategy HashLocationStrategy}
47
+ * @see {@link /api/common/PathLocationStrategy PathLocationStrategy}
51
48
  *
52
49
  * @publicApi
53
50
  */
54
- export declare function setUpLocationSync(ngUpgrade: UpgradeModule, urlType?: 'path' | 'hash'): void;
51
+ declare function setUpLocationSync(ngUpgrade: UpgradeModule, urlType?: 'path' | 'hash'): void;
55
52
 
56
- export { }
53
+ export { RouterUpgradeInitializer, setUpLocationSync };