[英]Angular4 - Remove a page reference from pages history stack
我想你需要查看https://angular.io/api/router/NavigationExtras#replaceUrl
根据doc,您需要在导航到组件时传递replaceUrl: true
:
Navigates while replacing the current state in history.
// Navigate to /view
this.router.navigate(['/view'], { replaceUrl: true });
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.