W3cubDocs

/Angular

setupTestingRouter

function deprecated

Router setup factory function used for testing.

Deprecated: Use provideRouter or RouterModule instead.

setupTestingRouter(urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location, compiler: Compiler, injector: Injector, routes: Route[][], opts?: ExtraOptions | UrlHandlingStrategy, urlHandlingStrategy?: UrlHandlingStrategy, routeReuseStrategy?: RouteReuseStrategy, titleStrategy?: TitleStrategy)

Deprecated Use provideRouter or RouterModule instead.

Parameters
urlSerializer UrlSerializer
contexts ChildrenOutletContexts
location Location
compiler Compiler
injector Injector
routes Route[][]
opts ExtraOptions | UrlHandlingStrategy

Optional. Default is undefined.

urlHandlingStrategy UrlHandlingStrategy

Optional. Default is undefined.

routeReuseStrategy RouteReuseStrategy

Optional. Default is undefined.

titleStrategy TitleStrategy

Optional. Default is undefined.

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