AngularJS expression not working within style attribute on IE8

Christian Quirós picture Christian Quirós · Dec 5, 2012 · Viewed 17.8k times · Source

Using an expression like this on the style attribute works on Chrome but doesn't work on IE8

style="width:{{progress}}%"

http://jsfiddle.net/5VDMD/12/ (to test it please type a number in the textbox)

Any workaround for this problem?

Answer

Aleksandr Sabov picture Aleksandr Sabov · Jun 18, 2013

Try

ng-style="{ width: progress + '%' }"