更新时间:2022-12-25 12:45:48
在desktop.module.ts中,您需要导出RouterModule
in desktop.module.ts you need to exports the RouterModule
@NgModule({
imports: [
CommonModule,
IonicModule,
RouterModule.forChild(routes)
],
declarations: [WorkoutComponent, DesktopComponent],
exports: [RouterModule]
})
,您应该像这样进行导航(尝试使用您的方式,如果仍然无法运行,请尝试以下操作):
and you should navigate like this (try ur way, if still not working try this):
[routerLink]="['/d/workout']"
routerLink="/d/workout"