withPreloading
function
stable
Allows to configure a preloading strategy to use. The strategy is configured by providing a
reference to a class that implements a PreloadingStrategy.
withPreloading
Allows to configure a preloading strategy to use. The strategy is configured by providing a
reference to a class that implements a PreloadingStrategy.
@parampreloadingStrategy
Type<PreloadingStrategy>A reference to a class that implements a PreloadingStrategy that
should be used.
@returns
PreloadingFeatureUsage Notes
Basic example of how you can configure preloading:
const appRoutes: Routes = [];bootstrapApplication(AppComponent, { providers: [ provideRouter(appRoutes, withPreloading(PreloadAllModules)) ] });
Jump to details