Javascript 角度路由器警告-您忘记调用ngZone.run()了吗
每次我试图从GoogleMap重定向到同一应用程序中的链接时,都会遇到这个错误。我使用的是Javascript 角度路由器警告-您忘记调用ngZone.run()了吗,javascript,angular,google-maps,agm-map,Javascript,Angular,Google Maps,Agm Map,每次我试图从GoogleMap重定向到同一应用程序中的链接时,都会遇到这个错误。我使用的是agmmap和angular 8。下面是示例代码 <agm-map <some configuration there>> <agm-marker <some configuration there>> <agm-snazzy-info-window <some configuration there> #infoWindow&g
agmmap
和angular 8。下面是示例代码
<agm-map <some configuration there>>
<agm-marker <some configuration there>>
<agm-snazzy-info-window <some configuration there> #infoWindow>
<ng-template>
<a routerLink="/details">{{'view_details' | translate}}</a>
</ng-template>
</agm-snazzy-info-window>
</agm-marker>
</agm-map>
,但我想知道它的根本原因是什么,代码中是否需要任何更改/重构来解决它?
此错误要求您调用ngZone.run()
由于每次要重定向到同一个应用程序google map时都会发生错误,因此应该在grantofleaccess()之后调用ngZone.run()
当用户授予所请求的作用域时,将调用GrantOfLineAccess(根据)
我建议您阅读错误消息,这可能会导致您修复90%的问题您用于“谷歌地图”的软件包是角度软件包吗?如果不是的话,它很可能是用纯JavaScript甚至jQuery编写的,但不会触发angular所依赖的更改检测。唯一的机会是手动将代码的某些部分包装到角度“区域”,或者使用另一个基于角度的包。@PhilippMeissner,谢谢,是的,这是一个角度包。