import { PreloadingStrategy , Route } from '@angular/router' ; import { Observable } from 'rxjs/Observable' ; export class PreloadSelectedModulesList implements PreloadingStrategy { param { Route } route param { Function } load returns { Observable < any > } memberof preload ( route , load ) { return route . data && route . data [ 'preload' ] ? load ( ) : Observable . throw ( null ) ; } }