更新时间:2023-02-13 18:00:53
我遇到了同样的问题,因此这是我的解决方案.希望对您有所帮助.
I have the same issue so here is my solution. Hope it helps.
{
path: '',
redirectTo: 'home/',
pathMatch: 'full',
},
{
path: 'home',
redirectTo: 'home/',
pathMatch: 'full',
},
{
path: 'home/:id',
component: HomeComponent,
}