Angular 5: remove route history

前端 未结 2 865
终归单人心
终归单人心 2020-12-16 09:48

In my app I have a category page that has links to a various product list pages. If it turns out that when you get to a product list page there is only one product then it

2条回答
  •  -上瘾入骨i
    2020-12-16 10:38

    You can use angular routers replaceUrl flag to do this. See api docs for more details here

    this.router.navigate(['/view'], { replaceUrl: true });
    

提交回复
热议问题