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 | 可选. 默认值是 `undefined`. |
urlHandlingStrategy | UrlHandlingStrategy | 可选. 默认值是 `undefined`. |