I have an app where i want to lazy load multiple modules in the same page one by one so that i can reduce page load time (like in my dashboard page) with the same route path.
My app-routing.modules.ts file:
const appRoutes: Routes = [
{ path: 'dashboard',
loadChildren: './dashboard/dashboard.module#DashboardModule'
},
{ path:'dashboard',
loadChildren: () => UserlistComponent, pathMatch:'full'
},
{ path:'dashboard',
loadChildren: () => ClientlistComponent, pathMatch:'full'
},
{ path: '',
loadChildren: './home/home.module#HomeModule'
},
My dashboard-routing.modules.ts file would look like this :
const routes: Routes = [
{
path: '',
component: DashboardComponent,
},
];
i cant' find anyway to do it like this : i want to load both component(user list and client list lazi loaded one by one so that i can reduce page load time ) when user redirect on dashboard page.
there is similar stackoverflow question (link) to this but i want to load component with lazy loading concept