I am populating a table with objects received from a JSON array generated by a remote PHP file:
<tr ng-repeat="data in filtered = (list | filter:search | orderBy : predicate :reverse) | startFrom:(currentPage-1)*entryLimit | limitTo:entryLimit">
<td>{{data.material_number}}</td>
<td>{{data.service_number}}</td>
<td>{{data.ordered}}</td>
<td>{{data.quantity}}</td>
<td>{{data.pending}}</td>
<td>{{data.unit}}></td>
<td>{{data.description}}</td>
<td>{{data.cost}}</td>
<td>{{data.net}}</td>
<td><a href="edit_po_item.php?id={{data.id_po}}" class="btn btn-info" role="button">Edit</a></td>
</tr>
Depending on the received values I need to make some design changes, for example, if {{data.pending}} is an integer between 1 and 5 I want to change the cell background color.
How can I convert the text value from {{data.unit}} to a variable that would let me set conditions to change the layout of the table?
Thank you in advance.