1

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>';
2
  • what exactly doesn't work? I guess it's about css. Try to open string with double quotes " and inside string use only single quote ' Commented Aug 7, 2014 at 10:24
  • Why would you store HTML inside the variable? gone are those days. Commented Aug 7, 2014 at 10:35

1 Answer 1

2

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>';
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.