router

Can anyone tell me the flow of router that how it treats the route configuration and nested routes in lazy-loaded modules?

倾然丶 夕夏残阳落幕 提交于 2020-08-08 05:41:31
问题 I want my lazy-loaded module in their children components to be parameterizly loaded in one <router-outlet></router-outlet> . My app.routing.module is const routes: Routes = [ { path: 'dashboard', component: DashboardComponent }, { path: 'reports', loadChildren: () => import('./reports/reports.module').then(m => m.ReportsModule) } { path: 'patients', loadChildren: () => import('./patients/patients.module').then(m => m.PatientsModule) }, { path: 'consultant', loadChildren: () => import('.

Can anyone tell me the flow of router that how it treats the route configuration and nested routes in lazy-loaded modules?

99封情书 提交于 2020-08-08 05:40:04
问题 I want my lazy-loaded module in their children components to be parameterizly loaded in one <router-outlet></router-outlet> . My app.routing.module is const routes: Routes = [ { path: 'dashboard', component: DashboardComponent }, { path: 'reports', loadChildren: () => import('./reports/reports.module').then(m => m.ReportsModule) } { path: 'patients', loadChildren: () => import('./patients/patients.module').then(m => m.PatientsModule) }, { path: 'consultant', loadChildren: () => import('.

Need clarification RouterModule.forRoot([ ABOUT_ROUTE ], { useHash: true })

大憨熊 提交于 2020-07-20 17:34:50
问题 Kindly explain useHash: true method in angular 2 route method. My Questions: what is the purpose we using it. why the value is "true" why not "false" ? if the value is false, what could be happen ? RouterModule.forRoot([ ABOUT_ROUTE ], { useHash: true }) 回答1: By default, angular uses HTML5 location-based routing, which may cause you problems in some environments. In the shake of simplicity, we usually prefer hash-based routing which regularly works in every environment. You can have a look at

Need clarification RouterModule.forRoot([ ABOUT_ROUTE ], { useHash: true })

一笑奈何 提交于 2020-07-20 17:34:42
问题 Kindly explain useHash: true method in angular 2 route method. My Questions: what is the purpose we using it. why the value is "true" why not "false" ? if the value is false, what could be happen ? RouterModule.forRoot([ ABOUT_ROUTE ], { useHash: true }) 回答1: By default, angular uses HTML5 location-based routing, which may cause you problems in some environments. In the shake of simplicity, we usually prefer hash-based routing which regularly works in every environment. You can have a look at