私はMaterialとConstructionパラメータでデータを並べ替えるために複数のフィルター(CodePenで表示)の実例を持っています。角度で1つの値だけデータをフィルタリングする方法は?
<select multiple="multiple" ng-model="selectedMaterial" ng-options="emp.material as emp.material for emp in empList | unique:'material'">
</select>
<table class="table table-bordered">
<tr>
<th>Material</th>
<th>Construction</th>
</tr>
<tr ng-repeat="emp in empList | filterMultiple:{material:selectedMaterial,construction:selectedConstruction}">
<td>{{emp.material}}</td>
<td>{{emp.construction}}</td>
</tr>
</table>
これは質問です。ボタンを押してそのデータをフィルタリングする必要がありますか?私の解決策がうまくいかない...
<button ng-click="filterMultiple= {material: 'Steel'}">Steel</button>
ありがとう!
材料鋼のみでフィルタリングしたいですか? – Sajeetharan
はい。 「すべて」ボタンをクリックして項目を除外してください –