1.0.1 • Published 5 years ago

ng-ondemand-preload v1.0.1

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

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 }