I have a directive:
angular
.module('test')
.directive('multiButton', function () {
return {
restrict: 'E',
replace: true,
scope: {
disabled: '@'
},
template: '<div class="multi-button"><button ng-disabled={{disabled}}></button></div>'
});
The disabled scope attribute is optional, but I don't want to have "ng-disabled" stuff in my template when rendered if no disabled attribute was submitted.
Is this possible? And if so how?
disabled: '@?', the?operator. stackoverflow.com/a/20447939/624590@?combined with acompilefunction to build the template String.disabledvalue dynamically