setupTestingRouter
Router setup factory function used for testing.
setupTestingRouter(urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location, loader: NgModuleFactoryLoader, compiler: Compiler, injector: Injector, routes: Route[][], opts?: ExtraOptions | UrlHandlingStrategy, urlHandlingStrategy?: UrlHandlingStrategy)
参数
urlSerializer | UrlSerializer | |
contexts | ChildrenOutletContexts | |
location | Location | |
loader | NgModuleFactoryLoader | |
compiler | Compiler | |
injector | Injector | |
routes | Route[][] | |
opts | ExtraOptions | UrlHandlingStrategy | 可选. 默认值是 |
urlHandlingStrategy | UrlHandlingStrategy | 可选. 默认值是 |