【发布时间】:2012-11-22 21:51:12
【问题描述】:
在样式属性上使用这样的表达式在 Chrome 上有效,但在 IE8 上无效
style="width:{{progress}}%"
http://jsfiddle.net/5VDMD/12/(要测试它,请在文本框中输入一个数字)
有解决这个问题的办法吗?
【问题讨论】:
-
您可能想尝试使用“ng-style”。
-
解决方案是 ng-style="{width: propertyInScope + '%'}" 感谢 David groups.google.com/forum/?fromgroups=#!topic/angular/Bb6087Gv284
-
这是 jsfiddle,解决方案在 IE8 上运行良好 jsfiddle.net/5VDMD/15
-
这在 IE11 中也不起作用。
标签: templates internet-explorer-8 expression angularjs