這裏是我工作,這是從角谷歌,地圖模塊問題隊列閱讀其他一些相關的錯誤。
jist是您需要在手錶內創建一個變量並使用它傳遞給模型參數。
基本JS:
controller('MainCtrl', function ($scope, $filter) {
$scope.$watch("breweryFilter", function(breweryFilter){
$scope.filteredMarkers = $filter("filter")($scope.breweries, breweryFilter);
if (!$scope.filteredMarkers){
return;
}
});
});
濾波器輸入:
<input name="brewery-filter" class="form-control" type="search" ng-model="breweryFilter" placeholder="filter locations" />
地圖指示標記包含指令:
<google-map
center="map.center"
zoom="map.zoom"
draggable="true"
control="map.control">
<window
show="breweryInfoWindow.showWindow"
coords="breweryInfoWindow.coords"
isIconVisibleOnClick="true"
options="breweryInfoWindow.options"
templateUrl="breweryInfoWindow.templateUrl"
templateParameter="breweryInfoWindow.templateParams"
data-ng-cloak>
_
</window>
<markers
models="filteredMarkers"
idKey="'nid'"
coords="'self'"
icon="'icon'"
doRebuildAll="true"
fit='true'
doCluster='true'
control="map.markersControl"
click="'onMarkerClicked'">
</markers>
</google-map>
希望這是對你有幫助。
您是否設法弄清楚爲什麼會發生這種情況? –