Reputation: 4878
I tried to use ng-style
because I need some dynamic color to work on IE11.
<tr ng-style="{'background-color':'{{section.Color}}'}">
I have a Angularjs
module that allow me to change color dynamically:
<button type="button" colorpicker type="button" colorpicker-position="top" ng-model="section.Color" >
change color
</button>
Some how it doesn't work. But if it is in normal style, it will update the color. How can I resolve this?
Upvotes: 0
Views: 1909
Reputation: 16805
Try this one
<tr ng-style="{'background-color':section.Color}">
no need to {{}}
for section.Color
in ng-style
Upvotes: 1
Reputation: 15292
This way
<tr ng-style="{'background-color':{{section.Color}} }">
Upvotes: 0