小编cms*_*che的帖子

样式元素中的AngularJS无法正常工作

我正在尝试在样式元素中使用角度js绑定,但它似乎不起作用.这是一个错误,还有更好的方法吗?

<style ng-repeat="test in styles">
.test {
    background-color: {{ test.backgroundColor }};
    display: {{ test.display }};
    width: {{ test.width }};
    height: {{ test.height }};
    }
</style>
Run Code Online (Sandbox Code Playgroud)

http://jsfiddle.net/cmsanche/PpyVn/

angularjs

5
推荐指数
1
解决办法
5833
查看次数

标签 统计

angularjs ×1