在 app.component.html 页面中添加 标签后报错:
解决:
在路由文件,即 app-routing.module.ts 中,添加上一句:exports: [RouterModule]
截图如下:
即可解决 router-outlet 的报错问题。
在 app.component.html 页面中添加 标签后报错:
解决:
在路由文件,即 app-routing.module.ts 中,添加上一句:exports: [RouterModule]
截图如下:
即可解决 router-outlet 的报错问题。