Reputation: 2504
I'm using Angular Material in my project. Is there a way to get AM theme color value in my angular controller?
Upvotes: 4
Views: 2219
Reputation: 11119
check http://codepen.io/beyondev/pen/pyeRRe You can get access to
$mdThemingProvider._PALETTES;
in .config and then pass it to controller
It is not finished, may be someone can do proper injection and rgba to hex
Upvotes: 0
Reputation: 881
The theme colors are not exactly where they should be at the moment, and it is hard to get references to them, at least it's above my own expertise (sorry).
Please take a look at this issue on the official github project, maybe it can be of help to you as people have taken to write their own mdColors directives to supplement the lack of theming extendability.
Upvotes: 1