简体   繁体   中英

angularjs internet explorer css issue

The following code works in google crome but does not work in Internet Explorer(9 to 11). value of {{value}} does not executed.

$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>';

wow, may be i found the answer. here is revised code

var stemp = '<div ng-repeat="(name, value) in dictionary">' +
            '<div class="templateHeader" ng-style="{ width: value +\'px\' }">{{name}} </div></div>';

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM