Reputation: 468
I am trying to add zebra stripe to a table which has hidden rows (uses ng-hide
to hide). Because angular only hides the rows, whether I use css3 or jQuery to strip, the coloring is not correct, you can see the sample below.
Row 3 is hidden, Row 2 and Row 4 are having same color.
Here is the Plunker.
How can I solve this?
Upvotes: 3
Views: 1214
Reputation: 9497
One approach would be to use ng-if, instead of ng-hide. This would prevent the element from being created, rather than hiding it. Then the css would work as expected.
Upvotes: 4