You can also use the special variable $last (or $first ), which is available inside the ng-repeat .
$last is true when the current element is the last in the array. $first works the same, but for the first element :)
Then you can use it inside ng-class , like this
<ul> <li ng-repeat="item in list" ng-class="{'last-item': $last}"> </ul>
and then define the .last-item css class
source share