这可能吗?翻阅文档后,几乎没有(如果有的话)在标记范围之外调用函数的变通方法。我希望添加一些 ng-click 功能,但鉴于 infowindow 中的 div 是 ng-non-bindable,它会阻止执行任何指令。如果没有解决方法,有谁知道我是否可以在 Angular 应用程序中使用标准的 javascript google maps 包并使用 jquery 支持它?
PS如果有人想出一种方法来风格化信息窗口,请告诉我。这令人沮丧。
我的目标是做类似的事情:
<ui-gmap-google-map center="map.center" zoom="map.zoom" options="map.options">
<ui-gmap-markers models="appFact.getList()" coords="'self'" icon="'icon'" click="'onClick'" options="'options'">
<ui-gmap-windows show="show">
<div ng-non-bindable>
<h5><strong>{{name}}</strong></h5>
<h5><strong>{{address}}</strong></h5>
<a href="" ng-class="btn btn-primary" ng-click="confirmAppointment()"></a>
</div>
</ui-gmap-windows>
</ui-gmap-markers>
</ui-gmap-google-map>
其中 confirmAppointment() 将获取约会信息并将资源请求发布到服务器。
感谢所有帮助。
谢谢。