ng-ondemand-preload
v1.0.1
Published
preloading strategy for preloading modules on viewport
Downloads
4
Readme
Preloading Strategy that lazy loads a module upon mouse hover
Installation and Usage
npm install interactive-preloading-strategy
To import the entire core set of functionality:
import { InteractivePreloadingStrategyModule } from 'interactive-preloading-strategy/interactive-preloading-strategy.module';
import above module into your AppModule
To import preloading strategy
import { InteractivePreloadingStrategy } from 'interactive-preloading-strategy/interactive-preloading-strategy';
import above preloading strategy, then add it to your RouterModule as a preloading strategy value
RouterModule.forRoot(routes, {preloadingStrategy: InteractivePreloadingStrategy})
Make sure your route path has loadonhover as route data
path: 'child', loadChildren: './child-module/child-module.module#ChildModuleModule',data: { loadonhover: true }