nlopez
1
I need the rows in the list to have different background color depending on whether their index is odd or not.
You need to use the %
modulo operator like this, if(item.idex % 2, "color_1", "color_2");
I also talk about these kind of methods in my blog post by the way.
1 Like