Reputation: 1189
First, I made an ajax call binding the data when the call returns
$scope.item = data;
$scope.$apply()
And I have a ng-repeat that does this
<li ng-repeat="n in range(item.length)" ng-class="{active: n ==currentPage}> {{n}} <li>
However the li element does not ever appear, any idea how?
Upvotes: 0
Views: 88
Reputation: 8986
Try this:
<li ng-repeat="i in item" ng-class="{active: $index === currentPage}">{{$index}}<li>
Upvotes: 1