I\'m looking for a good way to highlight the whole a row in md-table
.
Should I do directive or what?
Building on Zuzzie's answer, which is the solution that mostly worked for me, I did the following:
HTML:
add variable to TS:
selectedRow : boolean;
add this function to TS:
onRowClicked(row) {
if(!this.selectedRow)
{
this.selectedRow = row;
}
else
{
this.selectedRow = row;
}
}
(S)CSS
.selected {
background-color: red;
}