在样式属性角的Bug IE10变量 [英] Angular Bug IE10 variable in style attribute

查看:111
本文介绍了在样式属性角的Bug IE10变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我做这样的事情:

<div style="margin-left: 50px;">TEST1</div>
<div style="margin-left: {{50}}px;">TEST2</div>

http://jsfiddle.net/XeVHL/1/

的利润率左值test2的将不适用,而这只能在IE中,对于一个工作解决这个什么建议吗?

The margin-left of the value test2 will not be applied, and this only in IE, any suggestion for a work around this?

推荐答案

你可以使用一种变通方法 NG-风格

As a workaround you could use ng-style:

<div ng-style="{ 'margin-left': 50 + 'px'}">TEST2 {{50}}</div>

小提琴: http://jsfiddle.net/YXe8Z/

这篇关于在样式属性角的Bug IE10变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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