我有如下所示的延迟加载应用程序路由:
app.routing.ts
{
path: 'reports',loadChildren: () => import('../Reporting/reporting.module').then(m => m.ReportingModule)
},{
path: 'report-builder',
我的延迟加载模块路由如下
const routes: Routes = [
{
path: '',children: [
{ path: '',component: ReportsComponent },{ path: ':id',component: ViewReport},{ path: '**',component: ViewReport }
]
},{
path: '',component: ReportBuilderComponent },{ path: 'edit/:id',component: DesignReport },component: DesignReport }
]
}
我正在尝试实现以下目的:当用户单击报表路径时,导航到默认的Reportscomponent,并且在单击reportBuilder路径时,导航到ReportBuilderComponent。
如何实现这一目标。