The AngularJS ng-repeat directive is used to loop through a collection and creates new template for each item. Each item in the collection is given its own template and scope.
Property | Description |
---|---|
$index | iterator offset of the repeated element (0..length-1). |
$first | true if the repeated element is first in the iterator |
$middle | true if the repeated element is between the first and last in the iterator |
$last | true if the repeated element is last in the iterator. |
$even | true if the iterator position $index is even (otherwise false). |
$odd | true if the iterator position $index is odd (otherwise false). |
Syntax