Closed rakeshch closed 9 years ago
referring to question #9
I needed to use one-way binding. its a very small change: It's some kind of read-only ;)
replace html += ' ng-class="{ checked:' + attrs.ngModel + ' }"'; by html += ' ng-class="{ checked:' + (attrs.ngModel || attrs.state ) + ' }"';
now you can remove ng-model and set << switch state="ctrl.state" ng-click="ctrl.enable()" >
Perhaps this helps someone else too.
I have the same problem. It would be great if you could fix it.
Awesome, thanks so much.
Hi,
I like the control. It's simple to use. But only problem is I am not able to set ng-disabled/ readonly property on this control?
Thanks, Rakesh