I've got a directive with this markup:
<button type="button" ng-class="{ 'btn-disabled': button.isDisabled }">
As you can see, btn-disabled
is added as a CSS class if the scope's button.isDisabled
is truthy.
Also on the scope is a property button.glyphicon
. If glyphicon
is truthy, I'd like to add the value of it to the <button>
's class as well.
How can I do this?