Edgar Martinez Edgar Martinez - 6 months ago 45
Javascript Question

Can I filter ng-repeat with the $odd or $even properties?

I am trying to auto filter an

list by even index. Is it possible to do this somehow? Here's what I am trying but it isn't working:

<div data-ng-repeat="thing in things | filter:$even" >

Is there a proper way of achieving this?


This will show $even names of the things list.

<div ng-repeat="thing in things" ng-if="$even">