import { NgModule } from '@angular/core' ; import { NoPreloading , PreloadAllModules , RouterModule , Routes , } from '@angular/router' ; import { environment } from 'environments/environment' ; const routes = [ { path : '' , loadChildren : 'app/features/features.module#FeaturesModule' , } , ] ; @ NgModule ( { imports : [ RouterModule . forRoot ( routes , { preloadingStrategy : environment . preloadAllLazyLoadedModules ? PreloadAllModules : NoPreloading , } ) , ] , } ) export class AppRoutingModule { }