I have two objects ng-stylein my controller.
$scope.leftpadding = {
paddingLeft : '7px'
}
$scope.toppadding = {
paddingTop : '7px'
}
I want to use both of these objects in ng-style, for example
<h5 ng-style="toppadding leftpadding">
Does not work. since none of the objects are applied in style.
It can't be like
$scope.style = {
paddingLeft : '7px',
paddingTop : '7px'
}
Is there any way to achieve this?
source
share