RouterTestingModule
Class
Deprecated
Sets up the router to be used for testing.
withRoutes
ModuleWithProviders<RouterTestingModule>
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
.
Usage Notes
Example
beforeEach(() => { TestBed.configureTestingModule({ imports: [ RouterModule.forRoot( [{path: '', component: BlankCmp}, {path: 'simple', component: SimpleCmp}] ) ] });});
Jump to details