import { NgModule } from '@angular/core' ; import { Routes , RouterModule } from '@angular/router' ; const routes = [ { path : '' , redirectTo : '/app/main/dashboard' , pathMatch : 'full' } , { path : 'account' , loadChildren : ( ) => import ( './account/account.module' ) . then ( m => m . AccountModule ) , data : { preload : true } , } , ] ; @ NgModule ( { imports : [ RouterModule . forRoot ( routes , { relativeLinkResolution : 'legacy' } ) ] , exports : [ RouterModule ] , providers : [ ] , } ) export class RootRoutingModule { }