我对棱角问题还很陌生,不知道如何问这个问题。当我使用路由器重定向到另一个组件时,我遇到一个问题,skipLocationChange:true在浏览器中仍显示当前(称为)组件URl,
路由器的语法如下
this.myRouter.navigate(['test-component2',{skipLocationChange:true}])
并且它在浏览器中返回http://localhost:4200/test-component2;skipLocationChange=true
。问题也报告为错误here。是否有其他替代方法或当前问题的任何解决方法
在我看来是语法错误。尝试:
this.myRouter.navigate(['test-component2'],{skipLocationChange:true});