How to use the @angular/router.Router function in @angular/router

To help you get started, we’ve selected a few @angular/router examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github johandb / svg-drawing-tool / node_modules / @angular / router / fesm5 / testing.js View on Github external
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) {
github johandb / svg-drawing-tool / node_modules / @angular / router / esm5 / testing / src / router_testing_module.js View on Github external
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) {
github vyakymenko / angular-seed-express / src / client / testing / router / router-testing-providers.ts View on Github external
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]
github Promact / md2 / vendor / @angular / router / testing / router_testing_module.js View on Github external
export function setupTestingRouter(urlSerializer, outletMap, location, loader, compiler, injector, routes) {
    return new Router(null, urlSerializer, outletMap, location, injector, loader, compiler, flatten(routes));
}
/**
github JuanDelgadillo / angular2-pokedex / vendors / @angular / router / testing / router_testing_module.js View on Github external
export function setupTestingRouter(urlSerializer, outletMap, location, loader, compiler, injector, routes) {
    return new Router(null, urlSerializer, outletMap, location, injector, loader, compiler, flatten(routes));
}
/**
github bfwg / angular-spring-starter / frontend / node_modules / @angular / router / @angular / router / testing.js View on Github external
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;
}
/**
github Promact / md2 / libs / @angular / router / @angular / router / testing.es5.js View on Github external
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;
}
/**
github Promact / md2 / libs / @angular / router / @angular / router / testing.js View on Github external
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;
}
/**
github springboot-angular2-tutorial / angular2-app / src / shared / routes / router-testing-providers.ts View on Github external
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]
github bfwg / angular-spring-starter / frontend / node_modules / @angular / router / @angular / router / testing.es5.js View on Github external
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;
}
/**