Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular 技能改变不能很好地发挥作用_Angular_Angular Ui Router_Cesium - Fatal编程技术网

Angular 技能改变不能很好地发挥作用

Angular 技能改变不能很好地发挥作用,angular,angular-ui-router,cesium,Angular,Angular Ui Router,Cesium,我使用skipLocationChange在3个地图组件之间导航:铯、传单和Openlayers 3。我的应用程序保留了组件之间的位置,正如您在旧版本中看到的那样。 为了在从组件移动到其他组件时设置边界,我要订阅以下函数: setQueryBoundsOnNavigationEnd(event:NavigationEnd):void { let urlTree:UrlTree = this.leaflet.router.parseUrl(event.url); urlTree.queryPara

我使用skipLocationChange在3个地图组件之间导航:铯、传单和Openlayers 3。我的应用程序保留了组件之间的位置,正如您在旧版本中看到的那样。 为了在从组件移动到其他组件时设置边界,我要订阅以下函数:

setQueryBoundsOnNavigationEnd(event:NavigationEnd):void {
let urlTree:UrlTree = this.leaflet.router.parseUrl(event.url);
urlTree.queryParams['bounds'] = this.getBounds().toString();
extras.skipLocationChange = this.skipLocationChange;
return this.router.navigateByUrl(url, extras);
 }
这样

leaflet.router.events.filter(event => event instanceof NavigationEnd && event.url.includes("/cesium")).take(1).subscribe(this.setQueryBoundsOnNavigationEnd.bind(this));
但是当我从铯中回来时,url不再隐藏


提前谢谢

我缺少取消订阅,因此出现导航错误,状态未正确加载

您好,我遇到了相同的问题,导航更改历史记录正在修改。this.router.navigate['/view'],{skipLocationChange:true};如何解决这个问题?