关于使用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:
... 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;
}

你可能感兴趣的:(select)