ng-repeat
animation work if the collection has changed. You can use $filter
to reflect your change in the collection.
<li ng-class="{'text-danger': item == f}" ng-repeat="item in items| filter: filteredData" class="animate-repeat">
<span>{{item}}</span>
</li>
Here filteredData
is a controller function which execute your filter logic. (you can write custom filter as well)
$scope.filteredData = function(item) {
return (Math.abs($scope.f - item) < 2);
}
Check the updated Plunker how animation works.