Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data-enabled attribute #28

Open
motatoes opened this issue Nov 13, 2016 · 0 comments
Open

data-enabled attribute #28

motatoes opened this issue Nov 13, 2016 · 0 comments

Comments

@motatoes
Copy link

motatoes commented Nov 13, 2016

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 ..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant