Alternating styling for ion-item


#1

Hi. I am trying to style alternating items using ng-class-odd and ng-class-even however it is only styling the row and not the parent ion-item.

<ion-item ng-repeat="result in results" ng-href="#/app/products/{{result.id}}">
                        <div class="row" ng-class-odd="'odd'" ng-class-even="'even'">
                            <div>{{result.title}}</div>
                            <div>{{result.price}}</div>
                        </div>
</ion-item>

CSS

.odd { background: green; }

.even { background: red; }

and the result is:

I am hoping to style the entire ion-item (ion-item anchor, not just the anchor’s child div). I have tried using ng-class-odd and even in the ion-item directive but it didn’t do anything.

Any ideas?