Categories
Is it possible to make an array iterate from the end with ng-repeat?
ng-repeat="item in items" I want the output to start from the last element, not the first.
ng-repeat="item in items"
Answer the question
In order to leave comments, you need to log in
ng-repeat="item in items.slice().reverse()"
For versions higher than 1.3, if the version is lower, you can write a directive like
app.filter('reverse', function() { return function(items) { return items.slice().reverse(); }; });
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question