ng-enabled
Should this attribute be created in a future release?
what is the rationalization?
On Fri, Aug 10, 2012 at 7:01 AM, cric [email protected] wrote:
Should this attribute be created in a future release?
— Reply to this email directly or view it on GitHubhttps://github.com/angular/angular.js/issues/1252.
You need to use ng-disabled - there is no HTML attribute called enabled.
It should be added for completeness...
Why have both ng-show and ng-hide when you can just use ng-hide?
It sometimes reads better, just like the show/hide variants, by avoiding double negatives:
<button ng-enabled='loaded && product.available'/>
Vs:
<button ng-disabled='!(loaded && product.available)'/>
+1
+1
I have a function in this attribute. It confused the hell of me that I need to return true to disable the button.
+1
+1
as @adz said, like ng-show and ng-hide
+1 as it makes for better readability - an ng-enabled would eliminate double negatives
+1 :+1:
+1 as well. I spent a few minutes today wondering why my ng-enabled="blah" directive wasn't working before I realized that there wasn't one.
:+1:
+1 Come on guys, you can make it
+1 for intuitiveness, lower barrier to entry
+1 double negatives are harder to think about and easier to screw up
+1 if you have ng-hide and ng-show you should also have ng-enabled
+1
+1
+1
+1