AngularJS 表达式在 IE8 上的样式属性中不起作用 [英] AngularJS expression not working within style attribute on IE8

查看:25
本文介绍了AngularJS 表达式在 IE8 上的样式属性中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 style 属性上使用这样的表达式适用于 Chrome,但不适用于 IE8

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/(要测试它,请在文本框中输入一个数字)

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

这个问题有什么解决方法吗?

Any workaround for this problem?

推荐答案

尝试

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

这篇关于AngularJS 表达式在 IE8 上的样式属性中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆