I need to check a checkbox based on conditions. In my case, the function returns true for ng-checked.But after submit,the value shown as not checked. Any solutions for this?, greatly appreciated. Here I have tried so far:
$scope.findViewTocheck = function (module) {
if (module.x|| module.y|| module.z|| module.a) {
return true; // module.x ,module.y ,module.z,module.a these are booleans
}
else {
return false;
}
}
<input type="checkbox" ng-checked="findViewTocheck(module)"> //Here I am checking the value to be checked or not.
Aucun commentaire:
Enregistrer un commentaire