import { NgModule } from '@angular/core'; import { PreloadAllModules, RouterModule, Routes } from '@angular/router'; const routes: Routes = [ { path: '', redirectTo: 'authentication/login', pathMatch: 'full' }, { path: 'authentication', loadChildren: './authentication/authentication.module#AuthenticationPageModule', data: { preload: true, delay: 1000 } }, { path: 'home', loadChildren: './home/home.module#HomePageModule' }, { path: 'sms-page', loadChildren: './authentication/sms-page/sms-page.module#SmsPagePageModule' } ]; @NgModule({ imports: [ RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules }) ], exports: [RouterModule] }) export class AppRoutingModule { }