I am using the ng-repeat
directive in my code.
<tr data-ng-repeat="list in vm.customer.lists | orderBy: list.id track by $index">
<td>[[list.name]]</td>
<td>[[list.locations.length]] Location<span data-ng-cloak data-ng-if="list.locations.length !== 1">s</span></td>
<td><a data-ng-href="/#/locations/manage/list/edit/[[vm.customer.id]]/[[list.id]]" class="button expand">Manage Locations</a></td>
</tr>
I have a total of 3 lists in vm.customer.lists
I am attempting to sort these lists from least to greatest based on their list.id
(1, 2, 3, etc.)
Could it be that I am not able to use the orderBy
function with list
?