xpepermint / angular-ui-switch

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

Ng-Change not Working inside Angular-UI-Grid #58

Open mriso79 opened 7 years ago

mriso79 commented 7 years ago

Hi Guys, I'm using it inside angular-ui-grid but the ng-change event never fires ... Any clue ? Regards!

mriso79 commented 7 years ago

Hi !!! Just figured out. For those with the same problem:

You have a function: $scope.showMe = function(){ alert('some');}

So your NG-CHANGE in your Ui-Switch must be: ng-change="grid.appScope.showMe()"

as per https://github.com/angular-ui/ui-grid/issues/184