This causes problems when the supplied ng-change is actually a function with supplied parameters. This problem came up when using the switch inside an ng-repeat section. The function supplied to ng-change needed to have a parameter with the specific item.
<div ng-repeat="item in items">
<switch name="isActive" ng-model="item.isActive" class="green" ng-change="activate(item);"></switch>
</div>
Remove the () that are added on ng-change in line 12. Change
to
This causes problems when the supplied ng-change is actually a function with supplied parameters. This problem came up when using the switch inside an ng-repeat section. The function supplied to ng-change needed to have a parameter with the specific item.
Awesome control. Thanks for putting it together.