soma-template
soma-template copied to clipboard
data-enabled attribute
It would be nice to have a data-enabled
attribute which is the negation of the data-disabled
attribute. This will make the code more logical when tieing it to a boolean variable that determines whether or not a boolean attribute is enabled. For example:
Agree to terms and conditions:
<input type="checkbox" data-checked="{{termsAndConditionsChecked}}" >
<input type="text" data-enabled="{{termsAndConditionsChecked}}" >
And in the template
var template = function(scope) {
scope.termsAndConditions = false;
}
This will avoid having to do a negation for the variable as would be the case for the data-disabled
attribute.
Happy to work on a PR for this "feature" if needed ..