I used this jquery for a check-all checkbox that when clicked all of the checkboxes will be ticked:
function checkAll(e) {
var check = $(e).is(':checked');
if (check) {
$('[name="row_Checkbox"]:not(:checked)').trigger('click');
}
else {
$('[name="row_Checkbox"]:checked').trigger('click');
}
}
But it has a problem, I set the angular function for ng-click of checkboxes that changing ng-model according to the some condition, and if selected checkboxes more than a number the ng-model becoming null, it is working when I click checkboxes individually but when I am using check-all checkbox that ng-model do not becoming null and still has a value!!!
I tried various solutions, but any of them has a same result.
What is going wrong???
Aucun commentaire:
Enregistrer un commentaire