'All except one module doesn't load in lazy loading
I wrote the below code for lazyloading. All the modules except EmployerModule load well when I go to their corresponding routes. Can you please tell me what I am doing wrong
const routes: Routes = [
{
path: 'login',
loadChildren: () =>
import('./login/login.module').then((c) => c.LoginModule),
},
{
path: 'home',
loadChildren: () =>
import('./login/home.module').then((c) => c.HomeModule),
},
{
path: 'employer',
loadChildren: () =>
import('./employer/employer.module').then((c) => c.EmployerModule),
},
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule],
})
export class AppRoutingModule {}
Solution 1:[1]
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Nikhil Makwana |
