0

My AngularJS app doesn't work on IE11. I learnt I need to convert every inline style which contains angular variables into ng-style tags

This is what I've got:

<div id="mydiv" style="color: {{ ::channel.colour }};"></div>

how to convert it into an ng-style?

I tried converting it like this:

<div id="mydiv" ng-style="color: {{ ::channel.colour }};"></div>

but it doesn't work

EDIT

General issue: Manipulating inline style with angular does not work in IE

Community
  • 1
  • 1
Gianluca Ghettini
  • 11,129
  • 19
  • 93
  • 159

1 Answers1

1

seems to be scope variable is not binding to style or ng-style. you need to try something like

<div id="mydiv" ng-style="colour"></div>

And in controller

$scope.colour= {
  "color": "red"
}
ismail baig
  • 861
  • 2
  • 11
  • 39