【发布时间】:2018-06-06 04:43:22
【问题描述】:
我的应用程序有一个显示国家/地区的多选下拉菜单。此下拉菜单在 Chrome 中正确显示,在 IE 中显示如下选项:
我正在使用下面的代码(尝试将选择中的值更改为 ng-value 并且不起作用)-
HTML
<select multiple name="multiCountries" ng-model="vm.country.countryList">
<option ng-repeat="option in vm.country.filteredList" value="{{option.value}}">{{option.label}}</option>
</select>
【问题讨论】:
-
您可以尝试在
select元素中使用ng-options。<select multiple name="multiCountries" ng-model=vm.country.countryList" ng-options="option.value as option.label for option in vm.country.filteredList"></select> -
谢谢,它的工作。你能把这个添加为答案,所以我会选择那个..
-
如果您愿意接受,我已将我的评论添加为答案。
标签: javascript html angularjs