MCPcopy Create free account
hub / github.com/angular/angular / withPreloading

Function withPreloading

packages/router/src/provide_router.ts:589–595  ·  view source on GitHub ↗
(preloadingStrategy: Type<PreloadingStrategy>)

Source from the content-addressed store, hash-verified

587 * @publicApi
588 */
589export function withPreloading(preloadingStrategy: Type<PreloadingStrategy>): PreloadingFeature {
590 const providers = [
591 {provide: ROUTER_PRELOADER, useExisting: RouterPreloader},
592 {provide: PreloadingStrategy, useExisting: preloadingStrategy},
593 ];
594 return routerFeature(RouterFeatureKind.PreloadingFeature, providers);
595}
596
597/**
598 * A type alias for providers returned by `withRouterConfig` for use with `provideRouter`.

Callers 3

forRootMethod · 0.90

Calls 1

routerFeatureFunction · 0.85

Tested by

no test coverage detected