【发布时间】:2016-07-14 22:51:22
【问题描述】:
从下拉列表中选择项目后,每次按键都会触发错误:origItem.toUpperCase is not a function,请参阅http://plnkr.co/edit/xxTfWMcK3CuRPuiRldcB?p=preview
我的 ui 选择元素:
<ui-select multiple tagging tagging-label="(custom 'new' label)" ng-model="project.tags" theme="bootstrap" sortable="true" title="Tags">
<ui-select-match placeholder="Tags">{{$item.name || $item}}</ui-select-match>
<ui-select-choices repeat="tag in tags | filter:$select.search">
{{tag.name || tag}}
</ui-select-choices>
</ui-select>
tags 在哪里
$scope.tags = [
{
name: 'foo'
},
{
name: 'bar'
}
]
我没有找到任何关于使用对象作为下拉列表源的信息 - 但似乎我做错了。
【问题讨论】:
标签: javascript angularjs ui-select