【发布时间】:2016-02-10 02:11:02
【问题描述】:
我正在尝试在 ui 选择中使用或条件过滤器,但我不确定如何处理它。我有一个类似的问题已回答here。但这要求使用 AND 条件,这也适用于我。这是我的代码
HTML
<ui-select ng-model="citySelected">
<ui-select-match>
{{$select.selected.name + ', ' + $select.selected.country}}
</ui-select-match>
<ui-select-choices repeat="city in List | filter: {name: $select.search} | orderBy:'sortOrder'">
<span ng-bind-html="city.name + ', ' + city.country| highlight: $select.search"></span>
</ui-select-choices>
</ui-select>
【问题讨论】: