Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在页面 /offers/(offerID) 在页面上,我有优惠详情和最后添加的 5 个其他优惠。
当前页面 - /offers/(offerID)
在页面上有一个代码
<a [routerLink]="['/offers/', offer.id]>other offer</a>
当我点击链接时,页面 url 会改变,但路由器的视图不会。我必须刷新页面才能获得相同的路由器,但加载了新报价的详细信息。
有解决办法吗?谢谢
好的,伙计们,我做到了。我只是运行一个函数来搜索具有新 ID 的报价,因此无需重新加载路由器。