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

来源:互联网 发布:圣骑士挖矿软件 编辑:程序博客网 时间:2024/06/05 17:32

在使用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
原创粉丝点击