css - Multiple attributes in ng-style -



css - Multiple attributes in ng-style -

i need have multiple raw style attributes :

$scope.css = "'width': 'calc(100% - "+$scope.fixedcolumnswidth+"'),'margin-left':'"+ $scope.fixedcolumnswidth+"'"; <div ng-style="{css}">

this not working. works when use

<div style="{{css}}">

but not ie.

ng-style waits object literal, need adjust code to

$scope.css = { width: 'calc(100% -'+$scope.fixedcolumnswidth+')', 'margin-left': $scope.fixedcolumnswidth } <div ng-style="css"></div>

css angularjs ng-style

Comments

Popular posts from this blog

python - How to add an model instance to a django queryset? -

Using Android Volley to post an array to PHP -

angularjs - No 'Access-Control-Allow-Origin' error from local domain to public API -