【发布时间】:2018-12-08 17:12:16
【问题描述】:
您好,我是 Angular 的初学者,我在应用程序中遇到路由问题。我想要有餐厅的路线城市。
{ path: 'city', component: City1Component, children: [
{ path: 'restaurant', component: WenecjaComponent },
] },
结果视图餐厅位于城市景观中。 (图像出现问题): https://ibb.co/82yW1NR
显示:localhost:4200/city/restaurant 但餐厅视图显示在城市视图中。
router-outlet在routerlinks下的component.html中
单击卡片后,我只想将我移动到餐厅的视图中。卡片是带有文本的 2 个框。谁能帮我解决这个问题?
【问题讨论】:
-
你的图真的不太清楚,能注释一下吗?或者可以用文字具体描述?
-
ibb.co/pjvhDs6希望图片看得懂
标签: angular routing routes router