Checkbox OnCheck

This is my first post. I just added a checkbox into my html code, and I was wondering how to set a oncheckchange listener.
I have tried

$("#CHECKBOX").change(function(){

});
but this doesn’t seem to be working

Maybe this works http://docs.angularjs.org/api/ng.directive:ngChecked

1 Like

Are you using Angular or just the Ionic CSS? If using Angular, you do not want to be doing the jQuery $(…) stuff.

You should be using ng-change like :

<checkbox ng-change="tellMeItChanged()" ng-model="user.agreed">Agree?</checkbox>

1 Like

Thank you all for your answers. I now use angular to check for changes and it is working.

Thanks, I now user angular to check for changes and it works.