【发布时间】:2015-09-01 15:27:06
【问题描述】:
我在我的 Angular 项目中使用 this directive 用于 Google 地图。
<map center="50.4501, 30.5234" zoom="11" style="height: 100%" data-tap-disabled="true">
<marker ng-repeat="item in items | limitTo: 50" icon="img/marker.png" position="{{item.coords}}" eventid={{item.id}} on-click="go()">
</marker>
</map>
我需要使用返回 true / false 的函数更改标记的可见性。
我试图通过设置标记的属性 visible="isVisible()" 来使用 ng-if="isVisible()", ng-show="isVisible()" - 没有任何效果。
有什么想法吗?非常感谢。
【问题讨论】:
标签: javascript angularjs google-maps google-maps-api-3