Hi Sander,
Thx for reply !
In my app routing i have this :
export const appRoutes: Routes = [
{
path: 'driver',
component: MainLayoutComponent,
loadChildren: 'app/+driver/driver.module#DriverModule'
},
{
path: 'client',
component: MainLayoutComponent,
loadChildren: 'app/+client/client.module#ClientModule'
}
];
export const AppRouting: ModuleWithProviders = RouterModule.forRoot(appRoutes, {useHash: true});
The driver and client and in separate folders
driver/driver.component.ts
driver/driver.module.ts
driver/driver.routing.ts
driver/auth/auth.component.ts
driver/auth/auth.module.ts
driver/auth/auth.routing.ts
client/client.component.ts
driver/client.module.ts
client/client.routing.ts
client/auth/auth.component.ts
client/auth/auth.module.ts
client/auth/auth.routing.ts
In my client routing i have this :
import {Routes, RouterModule} from "@angular/router";
export const routes: Routes = [
{
path: 'auth',
loadChildren: './+auth/auth.module#AuthModule'
},
];
export const routing = RouterModule.forChild(routes);
And in my driver routing i have this :
import {Routes, RouterModule} from "@angular/router";
export const routes: Routes = [
{
path: 'auth',
loadChildren: './+auth/auth.module#AuthModule'
}
];
export const routing = RouterModule.forChild(routes);
My auth routing contains this :
import {ModuleWithProviders} from "@angular/core"
import {Routes, RouterModule} from "@angular/router";
export const routes: Routes = [
{
path: 'login',
loadChildren: './+login/login.module#LoginModule'
},
{
path: 'register',
loadChildren: './+register/register.module#RegisterModule'
},
{
path: 'forgot-password',
loadChildren: './+forgot/forgot.module#ForgotModule'
}
];
export const routing: ModuleWithProviders = RouterModule.forChild(routes);
Thx for your help :)