panagulis72 panagulis72 - 1 year ago 106
AngularJS Question

Change css style of Angular Material Data Table

I'm using mdDataTable to display data retrieved form Server. Is there a possibility to change the css class of

mdt-row
? If I try to add a class, mdDatatable overwrites it

Answer Source

in your own css file, you can override the css by explicitly targetting the angular md classes, like this:

.mdt-row {
  {overridesettingname}: {newsetting};
}

But I'd be careful because that overrides site-wide. You can override just a single page by targeting a parent element on the page, like:

.{mypageclassname} .mdt-row {
  {overridesettingname}: {newsetting};
}

Another note, make sure YOUR css file is loaded AFTER the angular css file(s).

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download