xpepermint / angular-ui-switch

On/off switch button for AngularJS. DEPRECATED!
278 stars 125 forks source link

Add support for ng-disabled #9

Closed joshfriend closed 8 years ago

JobaDiniz commented 9 years ago

+1 @joshfriend have you figure it out some way?

JobaDiniz commented 9 years ago

Looking at switch code, I think in order to support ng-disabled, a bit of refactoring is needed. The code is so simple, it just manages html...

In summary, in order to support disabled, directive should require ngModel and only change model value if it is not disabled.

joshfriend commented 9 years ago

I did not come up with a way to use ng-disabled (i didn't try yet actually). I just ng-hide the whole element for now.

xpepermint commented 8 years ago

https://github.com/xpepermint/angular-ui-switch/pull/23