最佳答案
如何从 URL 中删除查询参数? 例如从 www.expample.com/home?id=123&pos=sd&sd=iii到 www.expample.com/home?id=123&sd=iii
编辑: 这是我的版本:
this.activatedRoute.queryParams.subscribe(c => {
const params = Object.assign({}, c);
delete params.dapp;
this.router.navigate([], { relativeTo: this.activatedRoute, queryParams: params });
}).unsubscribe();