【发布时间】:2017-03-26 11:54:40
【问题描述】:
我有这个简单的表格,想用多项选择过滤它,以便使用多个过滤器显示结果,例如类型:顶部和低。
我尝试了一些库,例如 Select UI,但没有得到好的结果。 请帮忙。
<label>Type:</label>
<select ng-model="filterType" ng-options="item.type as item.type for item in samples | unique:'type'">
<option value="">Select</option>
</select>
<table class="table">
<tr>
<th>#</th>
<th>Name</th>
<th>Type</th>
<th>Status</th>
</tr>
<tr ng-repeat="item in samples | filter:filterType">
<td>{{item.id}}</td>
<td>{{item.name}}</td>
<td>{{item.type}}</td>
<td>{{item.status}}</td>
</tr>
</table>
【问题讨论】:
标签: angularjs