cgarvis / angular-toggle-switch

AngularJS Toggle Switch
http://cgarvis.github.io/angular-toggle-switch
MIT License
160 stars 124 forks source link

Disabled with bind value #78

Open zauker opened 9 years ago

zauker commented 9 years ago

I need to disable or enable dynamically the toggle switch i tried to use the disabled attribute but it seems that is not working well.

cgarvis commented 9 years ago

Try ng-disabled

On Wed, Oct 7, 2015 at 11:04 AM, Michele Menciassi notifications@github.com wrote:

I need to disable or enable dynamically the toggle switch i tried to use the disabled attribute but it seems that is not working well.


Reply to this email directly or view it on GitHub: https://github.com/cgarvis/angular-toggle-switch/issues/78

zauker commented 9 years ago

I tried to use ng-disabled attribute but without success. This is the plunker example that i made, i did some errors?

http://plnkr.co/edit/9kHn7zRgppvfMCk3j4Wa?p=preview

Any help is appreciated.

Sheeryada commented 9 years ago

+1

mnegahi commented 9 years ago

+1

Grant-Lay commented 8 years ago

+1

marcusvezz commented 8 years ago

It depends on the binding of the directive scope field "disabled" setted to "@". Set the binding to "=" and enjoy.

segux commented 7 years ago

+1 @marcusvezz . I just did a mod with '=' bind on disabled attribute.

toggleSwitch directive scope

scope: { disabled: '=', onLabel: '@', offLabel: '@', knobLabel: '@' },