Mam stół. Chcę filtrować tabelę w zależności od wybranej wartości w polu wyboru. Wartość porównawcza to {{pipe.pipe_id}} w polu wyboru i {{dimension.pipe_id}} w tabeli. Chyba istnieje proste rozwiązanie? Jakieś sugestie?Angular JS, stół filtracyjny z pudełkiem wyboru
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>
W polu wyboru najlepiej używać opcji ng. https://docs.angularjs.org/api/ng/directive/select – Jared