angularJS中使用bootstrap-select多选报错,为什么?
<select id="ShopSelectionCombobox"
class="form-control _shop-combo"
ng-options="shop.name as shop.displayName for shop in shops"
ng-model="selectedShop"
ng-change="selectChange({selectedShop:selectedShop})"
ui-jq="selectpicker"
ui-options='{ iconBase: "", tickIcon: "fa fa-check" }'
multiple
data-live-search="true"
data-dropup-auto="true"
data-none-selected-text="{{filterByShopText}}">
</select>
报错信息是:
TypeError: values.map is not a function
at SelectController.writeNgOptionsMultiple [as writeValue] (angular.js:29949)
at Object.ngModelCtrl.$render (angular.js:32572)
at updateOptions (angular.js:30131)
at $watchCollectionAction (angular.js:17718)
at Scope.$digest (angular.js:17855)
at Scope.$apply (angular.js:18125)
at done (angular.js:12233)
at completeRequest (angular.js:12459)
at XMLHttpRequest.requestLoaded (angular.js:12387)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保你的shops是数组的形式