angular.js icon indicating copy to clipboard operation
angular.js copied to clipboard

ng-enabled

Open cricardol opened this issue 14 years ago • 106 comments

Should this attribute be created in a future release?

cricardol avatar Aug 10 '12 14:08 cricardol

+1 =]

crw-riviere avatar Sep 18 '13 10:09 crw-riviere

+1

pfraces avatar Sep 18 '13 13:09 pfraces

Being new to angular and having just read about ng-show and ng-hide, I sort-of expected there to be ng-enabled to pair with ng-disabled too :+1:

danmichaelo avatar Sep 18 '13 16:09 danmichaelo

+1

ajhekman avatar Sep 18 '13 18:09 ajhekman

+1...this is a simple thing that makes a huge difference in code readability.

ejdyksen avatar Sep 18 '13 18:09 ejdyksen

+1

ericfledderman-zz avatar Sep 27 '13 13:09 ericfledderman-zz

Come on AngularJS developers, it might take only a few secs to commit but now you are stalling us for a year?

pencilcheck avatar Sep 27 '13 13:09 pencilcheck

I have added it to a milestone after we get RC3 out the door, for discussion. Perhaps someone would like to make a tested, CLA-signed PR with decent commit messages?

petebacondarwin avatar Sep 27 '13 15:09 petebacondarwin

+1 it would be nice to have it ng-enabled="true" -> no attribute disabled ng-enabled="false" -> set attr disabled

farolfo avatar Oct 29 '13 17:10 farolfo

+1

yngvark avatar Dec 04 '13 14:12 yngvark

+1

mhjam avatar Dec 14 '13 20:12 mhjam

+1

lord2800 avatar Dec 14 '13 20:12 lord2800

+1

crissdev avatar Dec 14 '13 20:12 crissdev

After a year and a half...is it added? I haven't contributed in many open source project but it seems tough to do such a minor change. It's a lot faster in other projects.

cricardol avatar Dec 15 '13 04:12 cricardol

@cricardol not added. But not hard to add (see already open PR : https://github.com/angular/angular.js/pull/4240). Its not added because the core team disagrees with the need for this feature

basarat avatar Dec 15 '13 06:12 basarat

Software engineers...Always arguing if something is conceptually coherent instead of using common sense.

cricardol avatar Dec 16 '13 02:12 cricardol

+1

ccapndave avatar Dec 18 '13 17:12 ccapndave

+1 To give concrete example of how the double negative impact: Either ng-disabled="!someValueModified" ng-enabled="someValueModified"

william-ferguson-au avatar Dec 31 '13 02:12 william-ferguson-au

+1 Agreed that this is a useful feature and conceptually similar to ngShow/ngHide. I can think of many examples in my own projects where I've had two elements that are shown/hidden or disabled/enabled on inverses of the same condition, and having the directives themselves mirrored instead of the logic they use makes a lot more sense at a glance.

leonsbuddydave avatar Jan 07 '14 19:01 leonsbuddydave

+1

ordochao avatar Jan 13 '14 11:01 ordochao