Open ido567 opened 8 years ago
is there a toggle method ? I mean I was struggling with this and copied this code and now I'm able to disable the switches, but I want to select a switch and disable the other one automatically...
@AcarMeel you can use this ui-switch https://github.com/hjzheng/angular-switch
That is worked. html += attrs.ngModel ? ' ng-click="' + (attrs.disabled ? attrs.ngModel : attrs.ngModel + '=!' + attrs.ngModel) + (attrs.ngChange ? '; ' + attrs.ngChange + '()"' : '"') : '';
But the attrs.disabled is always true in ng-click. In ng-class, attrs.disabled works fine.
The ng-disabled is not working. I changed the code a little bit is order to adjust the directive to the ng-disabled. Hope you will update it on the repo