import { NgModule } from '@angular/core' ; import { Routes , RouterModule } from '@angular/router' ; import { OrganizationComponent } from './organization.component' ; const routes = [ { path : '' , component : OrganizationComponent } , { path : ':slug/:employeeId' , loadChildren : ( ) => import ( '../employee/employee.module' ) . then ( ( m ) => m . EmployeeModule ) } ] ; @ NgModule ( { imports : [ RouterModule . forChild ( routes ) ] , exports : [ RouterModule ] } ) export class OrganizationRoutingModule { }