首页 > 解决方案 > 单个子路由的角度参数化路由

问题描述

我在 Angular 11 中使用路由:

{
  path: '',
  component: LandingpageComponent,
  pathMatch: 'full'
},
{
  path: 'upload',
  component: TemplateLeftPanelComponent,
  children: [
    {
      path: 'company/:companyId',
      loadChildren: () => import('./modules/upload/upload.module').then(m => m.UploadModule),
      outlet: 'content'
    },
    {
      path: '',
      loadChildren: () => import('./modules/upload/upload-panel/upload-panel.module').then(m => m.UploadPanelModule),
      outlet: 'panel'
    },
  ]
},
{
  path: '**',
  redirectTo: '/'
},

我想要它做什么:

它能做什么:

标签: angularroutesangular11

解决方案


推荐阅读