import { NgModule } from '@angular/core' ; import { Routes , RouterModule } from '@angular/router' ; import { HomeComponent } from './home/home.component' ; const routes = [ { path : '' , redirectTo : 'home' , pathMatch : 'full' } , { path : 'home' , component : HomeComponent } , { path : 'workspace' , loadChildren : ( ) => import ( './workspace/workspace.module' ) . then ( m => m . WorkspaceModule ) , } , ] ; @ NgModule ( { imports : [ RouterModule . forChild ( routes ) ] , exports : [ RouterModule ] } ) export class PageRoutingModule { }