关于使用ui-select出现Error: [ui.select:choices] htt错误的问题

在使用ui-select的时候出现[ui.select:choices] Expected multiple .ui-select-choices-row but got '0'.错误,

解决办法:原文链接

Add the tagging attribute binded to a function that return null, like this plunker, works for me too.

HTML:
<ui-select ... tagging="tagHandler" ... >

JS:

$scope.tagHandler = function (tag){
    return null;
}

html代码

<ui-select multiple tagging="tagHandler"  ng-model="data.body_mode_ids" theme="selectize" ng-disabled="disabled" title="选择部位">
    <ui-select-match placeholder="选择部位...">{{$item.name}}</ui-select-match>
    <ui-select-choices repeat="body_mode.id as body_mode in body_mode_list_data | filter: {name: $select.search}">
       <small>
           <span ng-bind-html="body_mode.name"></span>
       </small>
    </ui-select-choices>
</ui-select>

js代码

$scope.tagHandler = function (tag){
    return null;
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值