import { NgModule } from '@angular/core' ; import { PreloadAllModules , RouterModule , Routes } from '@angular/router' ; const routes = [ { path : 'sign-in' , loadChildren : ( ) => import ( './sign-in/sign-in.module' ) . then ( m => m . SignInPageModule ) } , { path : 'sign-up' , loadChildren : ( ) => import ( './sign-up/sign-up.module' ) . then ( m => m . SignUpPageModule ) } , { path : 'profile' , loadChildren : ( ) => import ( './profile/profile.module' ) . then ( m => m . ProfilePageModule ) } , { path : '' , redirectTo : 'sign-in' , pathMatch : 'full' } , ] ; @ NgModule ( { imports : [ RouterModule . forRoot ( routes , { preloadingStrategy : PreloadAllModules } ) ] , exports : [ RouterModule ] } ) export class AppRoutingModule { }