Angular Table Alternate Row Color. In this example you will learn how to ng-class-odd and ng-class-even directive to decorate the even and odd table rows in HTML table. The ng-repeat directive clones HTML elements once for each.
In cases when you have many rows to improve the visual appearance of the Grid and to easily scan through the rows it is better. My question is simple i want to know if theres a way to change the color of a row by doing a condition. This works when my mat-table does not have defined child rows.
Alternate rows color will help to increase readability of table data.
Read Alter Table Row Background Colors Using JavaScript and learn with SitePoint. F2f9ffscrollbars divnth-childodd background-color. Depending on current row state a different color is displayed as its background. We often need to display a table with alternate rows having different colors.