You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
In my brief tests, it seemed like ng-attr-* doesn't do the "right" thing for boolean attributes:
<inputng-attr-disabled="{{true}}">
I was kind of hoping this would result in:
<inputdisabled>
But it doesn't.
Now, I realize there is ng-disabled for this specific case. And there are many others that angular explicitly covers. However, I don't think this is really maintainable since there are attributes that aren't covered as it is, and new attributes come out all the time. Especially with Custom Elements being bigger thing these days, there is no general way to predict what new boolean attributes will crop up.
Wouldn't it just be nicer if all boolean attributes could be automatically handled the same way instead of being special-cased?
<inputis-disabled="true">
Lovely. Clear. Simple. Maintainable.
And of course you're always free to prefix for consistency with the rest of the framework (ng-is-disabled).