AngularJS风格IE的问题 [英] AngularJS style issue IE
问题描述
我试着去弄清楚如何使IE浏览器这项工作:
Im trying to figure out how to make this work on IE:
< DIV NG-IF =result.is_mesurable ==真的风格=左:{{(result.user_score * 20)-10}}%级=测试箱>
的code基本上生成一个动态表,和该对象的左位置从user_score值取
The code basically generates a dynamic table, and the left position of the object is taken from the user_score value.
我知道,IE浏览器无法正确读取此声明,我已经在过去的一个类似的错误:
I know that IE doesn't read this declaration properly, i had a similar bug in the past:
的因为{{xxx.xxx}}是它是由IE浏览器,当角度编译扫描所有的属性,样式属性为空trucated无效的CSS。的
我知道必须有一个类似的解决方案,但到目前为止,我一直无法弄清楚。
I know there must be a similar solution, but so far i've been unable to figure it out.
Thx提前。
还,只是要注意,在IE浏览器的结果是一个空的风格ATTR。
also, just to note, the result on IE is an empty style attr.
推荐答案
的问题是一样的,可解与吴式或NG-ATTR式:
The issue is the same, solvable with ng-style or ng-attr-style:
NG-风格:
<div ng-style="{left: ((result.user_score * 20) - 10) + '%'}" class="test-box" ng-if="result.is_mesurable==true">
NG-ATTR - *
ng-attr-*
<div ng-attr-style="left:{{ (result.user_score * 20)-10}}%" class="test-box" ng-if="result.is_mesurable==true" >
这篇关于AngularJS风格IE的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!