I am facing an issue with Angularjs and the table
tag when using group loops. The problem arises in achieving correct zebra striping for the list. How can I solve this to ensure the zebra pattern is applied correctly?
<table>
<tbody>
<tr><td>aaaaaaaa</td></tr>
<tr><td>aaaaaaaa</td></tr>
</tbody>
<tbody>
<tr><td>bbbbbbbb</td></tr>
</tbody>
<tr><td>bbbbbbbb</td></tr>
<tbody>
<tr><td>aaaaaaaa</td></tr>
</tbody>
<tbody>
<tr><td>aaaaaaaa</td></tr>
<tr><td>bbbbbbbb</td></tr>
</tbody>
<tbody>
<tr><td>bbbbbbbb</td></tr>
<tbody>
<tr><td>aaaaaaaa</td></tr>
</tbody>
<tbody>
<tr><td>aaaaaaaa</td></tr>
</tbody>
<tbody>
<tr><td>bbbbbbbb</td></tr>
</tbody>
<tbody>
<tr><td>bbbbbbbb</td></tr>
</tbody>
</table>
table tbody tr:nth-child(4n-1), table tbody tr:nth-child(4n+1) {
background: #ccc;
}
The current solution is not working as expected..