答案 0 :(得分:3)
我认为您需要查看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 });