以下代码适用于谷歌浏览器,但不适用于 Internet Explorer(9 到 11)。 {{value}} 的值未执行。
$scope.dictionary = { 'Item': 25, 'Name': 25, 'order': 12.5, 'value': 37.5 };
var stemp = '<div ng-repeat="(name, value) in dictionary">' +
'<div class="templateHeader" style=\"width:{{value}}px;\">{{name}} </div></div>';
最佳答案
哇,也许我找到了答案。这是修改后的代码
var stemp = '<div ng-repeat="(name, value) in dictionary">' +
'<div class="templateHeader" ng-style="{ width: value +\'px\' }">{{name}} </div></div>';
关于css - angularjs Internet Explorer CSS 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25179976/