Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function setupTestingRouter(urlSerializer, contexts, location, loader, compiler, injector, routes, opts, urlHandlingStrategy) {
var router = new Router(null, urlSerializer, contexts, location, injector, loader, compiler, ɵflatten(routes));
if (opts) {
// Handle deprecated argument ordering.
if (isUrlHandlingStrategy(opts)) {
router.urlHandlingStrategy = opts;
}
else {
// Handle ExtraOptions
if (opts.malformedUriErrorHandler) {
router.malformedUriErrorHandler = opts.malformedUriErrorHandler;
}
if (opts.paramsInheritanceStrategy) {
router.paramsInheritanceStrategy = opts.paramsInheritanceStrategy;
}
}
}
if (urlHandlingStrategy) {
export function setupTestingRouter(urlSerializer, contexts, location, loader, compiler, injector, routes, opts, urlHandlingStrategy) {
var router = new Router(null, urlSerializer, contexts, location, injector, loader, compiler, flatten(routes));
if (opts) {
// Handle deprecated argument ordering.
if (isUrlHandlingStrategy(opts)) {
router.urlHandlingStrategy = opts;
}
else {
// Handle ExtraOptions
if (opts.malformedUriErrorHandler) {
router.malformedUriErrorHandler = opts.malformedUriErrorHandler;
}
if (opts.paramsInheritanceStrategy) {
router.paramsInheritanceStrategy = opts.paramsInheritanceStrategy;
}
}
}
if (urlHandlingStrategy) {
useFactory: (resolver:ComponentResolver, urlSerializer:UrlSerializer,
outletMap:RouterOutletMap, location:Location, injector:Injector) => {
return new Router(
rootComponentType, resolver, urlSerializer, outletMap, location, injector, config);
},
deps: [ComponentResolver, UrlSerializer, RouterOutletMap, Location, Injector]
export function setupTestingRouter(urlSerializer, outletMap, location, loader, compiler, injector, routes) {
return new Router(null, urlSerializer, outletMap, location, injector, loader, compiler, flatten(routes));
}
/**
export function setupTestingRouter(urlSerializer, outletMap, location, loader, compiler, injector, routes) {
return new Router(null, urlSerializer, outletMap, location, injector, loader, compiler, flatten(routes));
}
/**
function setupTestingRouter(urlSerializer, contexts, location, loader, compiler, injector, routes, urlHandlingStrategy) {
const router = new Router(null, urlSerializer, contexts, location, injector, loader, compiler, ɵflatten(routes));
if (urlHandlingStrategy) {
router.urlHandlingStrategy = urlHandlingStrategy;
}
return router;
}
/**
function setupTestingRouter(urlSerializer, outletMap, location, loader, compiler, injector, routes, urlHandlingStrategy) {
var router = new Router(null, urlSerializer, outletMap, location, injector, loader, compiler, ɵflatten(routes));
if (urlHandlingStrategy) {
router.urlHandlingStrategy = urlHandlingStrategy;
}
return router;
}
/**
function setupTestingRouter(urlSerializer, outletMap, location, loader, compiler, injector, routes, urlHandlingStrategy) {
const router = new Router(null, urlSerializer, outletMap, location, injector, loader, compiler, ɵflatten(routes));
if (urlHandlingStrategy) {
router.urlHandlingStrategy = urlHandlingStrategy;
}
return router;
}
/**
useFactory: (resolver:ComponentResolver, urlSerializer:UrlSerializer,
outletMap:RouterOutletMap, location:Location, injector:Injector) => {
return new Router(
rootComponentType, resolver, urlSerializer, outletMap, location, injector, config);
},
deps: [ComponentResolver, UrlSerializer, RouterOutletMap, Location, Injector]
function setupTestingRouter(urlSerializer, contexts, location, loader, compiler, injector, routes, urlHandlingStrategy) {
var router = new Router(null, urlSerializer, contexts, location, injector, loader, compiler, ɵflatten(routes));
if (urlHandlingStrategy) {
router.urlHandlingStrategy = urlHandlingStrategy;
}
return router;
}
/**