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

Function withPreloading

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

Source from the content-addressed store, hash-verified

580 * @publicApi
581 */
582export function withPreloading(preloadingStrategy: Type<PreloadingStrategy>): PreloadingFeature {
583 const providers = [
584 {provide: ROUTER_PRELOADER, useExisting: RouterPreloader},
585 {provide: PreloadingStrategy, useExisting: preloadingStrategy},
586 ];
587 return routerFeature(RouterFeatureKind.PreloadingFeature, providers);
588}
589
590/**
591 * 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