我将如何使用 AngularJS 中的选择选项来选择多个项目数组中的项目。这是一个谷歌地图 API 应用程序。如果我选择 Manager1,我想返回解析为 Bert Bingham 等的标记。我发现的示例是列出数组 [] 中的项目,但它不会以这种方式返回任何内容。谢谢!
JSON
var sites= [
{name: "ABC",ISE:["Bert Bingham","Manager1"],lat:"29.9792183",lng:"-90.22268919999999"},
{name: "Ajax",ISE:["Bert Bingham","Manager1"],lat:"30.0032515",lng:"-90.22060119999999"},
{name: "CBS",ISE:["Bing Bingle","Manager2"],lat:"31.9703011",lng:"-90.08290799999999"},
{name: "Turner",ISE:["Bing Bingle","Manager2"],lat:"31.004759",lng:"-90.17053299999999"},
];
HTML
<div ng-app="mapsApp" ng-controller="MapCtrl">
<div align ="center" class ="input-w">
<div class ="gulf">Gulf States</div>
<fieldset>
<label>ISE: </label>
<select id ="ISEs" class="dropdown" name="singleSelect"
ng-model="data.singleSelect"
ng-change="filterMarkers();centerMap()">
<option value="0">all</option>
<option id ="1" value="Bert Bingham">Bert Bingham</option>
<option id = "2" value="Bing Bingle">Bing Bingle</option>
<option id = "2" value="Manager1">Manager1</option>
<option id = "2" value="Manager2">Manager2</option>
</select><br><br>
</fieldset>
</div>
<div id="map"></div>