This snippet shows my problem nicely:
Important parts:
<tr ng-repeat="result in results | orderBy:predicate" ng-class="classRow($index)">
$scope.classRow = function(i) {
return $scope.results[i].size > 9000 ? 'highlight' : '';
}
As you can see, the index always goes from 0 to 6 even when re-sorting the array, so the highlight doesn't move with the item.
How can I get the highlight to stick to the item it's originally at?