Edgar Martinez Edgar Martinez - 1 year ago 105
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?

Answer Source

This will show $even names of the things list.

<div ng-repeat="thing in things" ng-if="$even">
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download