Within our controller, we are defining two ng-style objects.
$scope.rightpadding = {
paddingRight : '11px'
}
$scope.toppadding = {
paddingTop : '7px'
}
Our goal is to combine both of these in an ng-style directive, like so:
Unfortunately, this does not work as intended.
It cannot be achieved simply by doing:
$scope.style = { paddingRight : '11px', paddingTop : '7px' } So, how can we make this happen?