Angularjs Material - How to force theme on table

Viewed 22

Ive been stuck on this last bit of my projet. In my angularjs Material (1.2.1) project I have 2 themes (Dark mode and Light mode) and all the material components are reacting correctly.

However when i put a <table> in a <Md-card-container>, the text color in my <td> dont follow. So i tried adding this to my table:

<table md-theme="{{ dynamicTheme }}" md-theme-watch="">

Was hoping this would magically syncronize the text color with the theme chosen but no. My planB was to then add this to all my <td> tags : <td class=" {{ dynamicTheme === 'Dark' ? {color: 'white'} : {color: 'black'} }} "

I just think PlanB seems a bit overkill, especially that my table is very large. Just curios to know if anyone came accross this issue and if anyone sees a better workaround / solution to this? Iver searched alot of forums but this particular scenario dosent seem to be covered anywhere.

Any input is appreciated.

0 Answers
Related