I can set the button text from my db and wondered if it would be possible to set the button colour in the same way?
I can set the button text from my db and wondered if it would be possible to set the button colour in the same way?
Hello Tony,
For the AngularJS apps:
1) get the values from DB
2) apply certain class (previously defined in css) using ng-class
https://scotch.io/tutorials/the-many-...
ng-class -- color-for-{{valueFromDB}}
in CSS
.color-for-value1 { ..styling }
.color-fro-value2 { ..styling }
etc.
For the JQM apps:
1) please add JS to the button's mapping:
$(element).addClass("color-for-" + value);
Thanks Sergiy,
I'll try it with jquery and let you know,