@angular/router
Advanced tools
Comparing version
{ | ||
"name": "@angular/router", | ||
"version": "20.0.0-next.1", | ||
"version": "20.0.0-next.2", | ||
"description": "Angular - the routing library", | ||
@@ -27,5 +27,5 @@ "keywords": [ | ||
"peerDependencies": { | ||
"@angular/core": "20.0.0-next.1", | ||
"@angular/common": "20.0.0-next.1", | ||
"@angular/platform-browser": "20.0.0-next.1", | ||
"@angular/core": "20.0.0-next.2", | ||
"@angular/common": "20.0.0-next.2", | ||
"@angular/platform-browser": "20.0.0-next.2", | ||
"rxjs": "^6.5.3 || ^7.4.0" | ||
@@ -32,0 +32,0 @@ }, |
/** | ||
* @license Angular v20.0.0-next.1 | ||
* @license Angular v20.0.0-next.2 | ||
* (c) 2010-2025 Google LLC. https://angular.io/ | ||
@@ -7,14 +7,46 @@ * License: MIT | ||
import * as i0 from '@angular/core'; | ||
import { ModuleWithProviders, WritableSignal, DebugElement, Type } from '@angular/core'; | ||
import * as _angular_router from '@angular/router'; | ||
import { Routes, ExtraOptions } from '@angular/router'; | ||
import { ComponentFixture } from '@angular/core/testing'; | ||
import { DebugElement } from '@angular/core'; | ||
import { ExtraOptions } from '@angular/router'; | ||
import * as i0 from '@angular/core'; | ||
import * as i1 from '@angular/router'; | ||
import { ModuleWithProviders } from '@angular/core'; | ||
import { Routes } from '@angular/router'; | ||
import { Type } from '@angular/core'; | ||
import { WritableSignal } from '@angular/core'; | ||
/** | ||
* @description | ||
* | ||
* Sets up the router to be used for testing. | ||
* | ||
* The modules sets up the router to be used for testing. | ||
* It provides spy implementations of `Location` and `LocationStrategy`. | ||
* | ||
* @usageNotes | ||
* ### Example | ||
* | ||
* ```ts | ||
* beforeEach(() => { | ||
* TestBed.configureTestingModule({ | ||
* imports: [ | ||
* RouterModule.forRoot( | ||
* [{path: '', component: BlankCmp}, {path: 'simple', component: SimpleCmp}] | ||
* ) | ||
* ] | ||
* }); | ||
* }); | ||
* ``` | ||
* | ||
* @publicApi | ||
* @deprecated Use `provideRouter` or `RouterModule`/`RouterModule.forRoot` instead. | ||
* This module was previously used to provide a helpful collection of test fakes, | ||
* most notably those for `Location` and `LocationStrategy`. These are generally not | ||
* required anymore, as `MockPlatformLocation` is provided in `TestBed` by default. | ||
* However, you can use them directly with `provideLocationMocks`. | ||
*/ | ||
declare class RouterTestingModule { | ||
static withRoutes(routes: Routes, config?: ExtraOptions): ModuleWithProviders<RouterTestingModule>; | ||
static ɵfac: i0.ɵɵFactoryDeclaration<RouterTestingModule, never>; | ||
static ɵmod: i0.ɵɵNgModuleDeclaration<RouterTestingModule, never, never, [typeof _angular_router.RouterModule]>; | ||
static ɵinj: i0.ɵɵInjectorDeclaration<RouterTestingModule>; | ||
} | ||
/** | ||
* A testing harness for the `Router` to reduce the boilerplate needed to test routes and routed | ||
@@ -25,3 +57,3 @@ * components. | ||
*/ | ||
export declare class RouterTestingHarness { | ||
declare class RouterTestingHarness { | ||
/** | ||
@@ -91,39 +123,2 @@ * Creates a `RouterTestingHarness` instance. | ||
/** | ||
* @description | ||
* | ||
* Sets up the router to be used for testing. | ||
* | ||
* The modules sets up the router to be used for testing. | ||
* It provides spy implementations of `Location` and `LocationStrategy`. | ||
* | ||
* @usageNotes | ||
* ### Example | ||
* | ||
* ```ts | ||
* beforeEach(() => { | ||
* TestBed.configureTestingModule({ | ||
* imports: [ | ||
* RouterModule.forRoot( | ||
* [{path: '', component: BlankCmp}, {path: 'simple', component: SimpleCmp}] | ||
* ) | ||
* ] | ||
* }); | ||
* }); | ||
* ``` | ||
* | ||
* @publicApi | ||
* @deprecated Use `provideRouter` or `RouterModule`/`RouterModule.forRoot` instead. | ||
* This module was previously used to provide a helpful collection of test fakes, | ||
* most notably those for `Location` and `LocationStrategy`. These are generally not | ||
* required anymore, as `MockPlatformLocation` is provided in `TestBed` by default. | ||
* However, you can use them directly with `provideLocationMocks`. | ||
*/ | ||
export declare class RouterTestingModule { | ||
static withRoutes(routes: Routes, config?: ExtraOptions): ModuleWithProviders<RouterTestingModule>; | ||
static ɵfac: i0.ɵɵFactoryDeclaration<RouterTestingModule, never>; | ||
static ɵmod: i0.ɵɵNgModuleDeclaration<RouterTestingModule, never, never, [typeof i1.RouterModule]>; | ||
static ɵinj: i0.ɵɵInjectorDeclaration<RouterTestingModule>; | ||
} | ||
export { } | ||
export { RouterTestingHarness, RouterTestingModule }; |
/** | ||
* @license Angular v20.0.0-next.1 | ||
* @license Angular v20.0.0-next.2 | ||
* (c) 2010-2025 Google LLC. https://angular.io/ | ||
@@ -7,5 +7,3 @@ * License: MIT | ||
import { ComponentRef } from '@angular/core'; | ||
import { InjectionToken } from '@angular/core'; | ||
import { InjectionToken, ComponentRef } from '@angular/core'; | ||
import { UpgradeModule } from '@angular/upgrade/static'; | ||
@@ -36,3 +34,3 @@ | ||
*/ | ||
export declare const RouterUpgradeInitializer: { | ||
declare const RouterUpgradeInitializer: { | ||
provide: InjectionToken<readonly ((compRef: ComponentRef<any>) => void)[]>; | ||
@@ -43,3 +41,2 @@ multi: boolean; | ||
}; | ||
/** | ||
@@ -57,4 +54,4 @@ * Sets up a location change listener to trigger `history.pushState`. | ||
*/ | ||
export declare function setUpLocationSync(ngUpgrade: UpgradeModule, urlType?: 'path' | 'hash'): void; | ||
declare function setUpLocationSync(ngUpgrade: UpgradeModule, urlType?: 'path' | 'hash'): void; | ||
export { } | ||
export { RouterUpgradeInitializer, setUpLocationSync }; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
1161033
-1.9%12884
-0.92%