angular / 6.1.10 / api / router / testing / setuptestingrouter.html /

setupTestingRouter

function

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)

Parameters

urlSerializer

Type: UrlSerializer.

contexts

Type: ChildrenOutletContexts.

location

Type: Location.

loader

Type: NgModuleFactoryLoader.

compiler

Type: Compiler.

injector

Type: Injector.

routes

Type: Route[][].

opts

Type: ExtraOptions | UrlHandlingStrategy.

Optional. Default is undefined.

urlHandlingStrategy

Type: UrlHandlingStrategy.

Optional. Default is undefined.

© 2010–2019 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v6.angular.io/api/router/testing/setupTestingRouter