import { RouterModule , Routes } from '@angular/router' ; import { NgModule } from '@angular/core' ; import { PagesComponent } from './pages.component' ; import { DashboardComponent } from './dashboard/dashboard.component' ; import { InFaxComponent } from './infax/infax-component' ; import { ChangePasswordComponent } from './changepassword/changepassword-component' ; const routes = [ { path : '' , component : PagesComponent , children : [ { path : 'dashboard' , component : DashboardComponent , } , { path : 'infax' , component : InFaxComponent } , { path : 'Changepass' , component : ChangePasswordComponent } , { path : 'contact' , loadChildren : ( ) => import ( './contact/contact.module' ) . then ( m => m . ContactModule ) , } , { path : 'message' , loadChildren : ( ) => import ( './message/message.module' ) . then ( m => m . MessageModule ) , } , { path : 'transmission' , loadChildren : ( ) => import ( './transmission/transmission.module' ) . then ( m => m . TransmissionModule ) , } , { path : 'provider' , loadChildren : ( ) => import ( './provider/provider.module' ) . then ( m => m . ProviderModule ) , } , { path : 'user' , loadChildren : ( ) => import ( './user/user.module' ) . then ( m => m . UserModule ) , } , { path : 'extension' , loadChildren : ( ) => import ( './extension/extension.module' ) . then ( m => m . ExtensionModule ) , } , { path : 'incoming_number' , loadChildren : ( ) => import ( './incoming_number/incoming_number.module' ) . then ( m => m . IncomingNumberModule ) , } , { path : 'sendfax' , loadChildren : ( ) => import ( './sendfax/sendfax.module' ) . then ( m => m . SendFaxModule ) , } , { path : 'did' , loadChildren : ( ) => import ( './did/did.module' ) . then ( m => m . DIDModule ) , } , { path : '' , redirectTo : 'dashboard' , pathMatch : 'full' , } ] , } ] ; @ NgModule ( { imports : [ RouterModule . forChild ( routes ) ] , exports : [ RouterModule ] , } ) export class PagesRoutingModule { }