I'm so new in javascript/angularJS, what I have to do is maybe simple, but I don't really know. I have a checkbox like this :
<input id="myInput" type="checkbox" ng-checked="isChecked">
And now when i click to perform the value isChecked in my model is updated correctly. This is the simple part. Now I have to add a control on the oncheck event. In other words: before that isChecked is being updated, the value in the model I have to perform a validation and if the validation return false, the value isChecked should not be updated.