Actually i am facing problem while establishing lazy loading in my app. I am using angular 6. Here is scenario-
In my app-routing.module.ts i have following routes-
const appRoutes: Routes = [
{
path: '',
redirectTo: 'dashboard', pathMatch: 'full'
},
{
path:'home',
loadChildren: './main/home/home.module#HomeModule'
}
{ path: '**', redirectTo: '/404' }
];
In my home.module.ts i have this routes-
const routes: Routes = [
{
path: '',
component: HomeComponent
},
{
path:'list',
component: ListComponent
}
];
Now want to navigate just like below-
- /home---> HomeComponent
- /list---> ListComponent
I can navigate to HomeComponent but can't navigate to ListComponent .can anyone help me how can i achieve this. Thank you