Variable |
Type |
Details |
$index |
number |
iterator offset of the repeated element (0..length-1) |
$first |
boolean |
true if the repeated element is first in the iterator. |
$middle |
boolean |
true if the repeated element is between the first and last in the iterator. |
$last |
boolean |
true if the repeated element is last in the iterator. |
$even |
boolean |
true if the iterator position $index is even (otherwise false). |
$odd |
boolean |
true if the iterator position $index is odd (otherwise false). |
<ul> <li ng-repeat="food in foods | filter:search "> {{food.name}} : {{food.price}} <span ng-show="$first">- This is First</span> <span ng-show="$last"> - This is Last</span> </li> </ul>