私はテーブルを持っています。私は選択ボックスで選択された値に応じてテーブルをフィルタリングしたい。比較値は、選択ボックスの{{pipe.pipe_id}}と表の{{dimension.pipe_id}}です。これには単純な解決策があると思いますか?なにか提案を?Angular JS、選択ボックス付きフィルターテーブル
Pipe:
<select id="select01">
<option ng-repeat="pipe in pipes">{{pipe.code}} - {{pipe.title_en}}</option>
</select>
<table class="table table-striped">
<thead>
<tr>
<th>Pipe</th>
<th>Size</th>
<th>Inner diameter</th>
<th>Outer diameter</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="dimension in dimensions" >
<td>{{dimension.pipe_id}}</td>
<td>{{dimension.nominalsize}}</td>
<td>{{dimension.innerdiameter}}</td>
<td>{{dimension.outerdiameter}}</td>
</tr>
</tbody>
</table>
選択ボックスでは、ng-optionsを使用することをお勧めします。 https://docs.angularjs.org/api/ng/directive/select – Jared