angular - loadchildren in different routing module -
i have been trying again many methods , stuck new scenario
below app.module.ts
export const routes: routes=[ { path: '', component: logincomponent}, { path: 'maincontent', loadchildren: './main-content/maincontent.module#maincontentmodule' }]
below maincontent.module.ts
export const routes: routes = [ { path: 'maincontent', component: maincontentcomponent, children: [ { path: 'dashboard', loadchildren: './dashboard/dashboard.module#dashboardmodule' }, ] }];
in dashboard.module.ts have following routes
export const routes: routes = [ { path:'dashboard', component:dashboardcomponent, children:[ { path:'application',component:applicationdetailscomponent } ] } ]
the problem when login have navigated directly dashboard page , doesn't show contents of page . going wrong can guide me please
i think should make path
child routes empty string
maincontent.module.ts
export const routes: routes = [ { path: '', // instead of path: 'maincontent', component: maincontentcomponent, children: [ { path: 'dashboard', loadchildren: './dashboard/dashboard.module#dashboardmodule' }, ] }];
dashboard.module.ts
export const routes: routes = [ { path: '', // instead of path: 'dashboard' component: dashboardcomponent, children: [ { path: 'application', component: applicationdetailscomponent } ] } ]
Comments
Post a Comment