I have certain conditions for checking a checkbox and I am using the function logic for that inside the ng-checked with conditional operators. That's working fine for me. The problem is that upon submitting the model values I'm not getting the ng-checked values. How to get that ng-checked values modified as well? Hope I get an answer. This is I have tried:
<input type="checkbox" id="View" ng-model="module.View"
ng-checked="((findViewCheckBoxIsChecked(module)) || (module.ViewAll))"
ng-disabled="disableCheckBox(module)">
$scope.findViewCheckBoxIsChecked = function (module) {
if (module.View || module.ViewAll || module.Name == 'x' && module.Add
|| module.Name == 'x' && module.Edit
|| module.Name == 'x' && module.Delete
|| module.Name == 'x' && module.Add
|| module.Name == 'y' && module.Edit
|| module.Name == 'y' && module.Delete
|| module.Name == 'z' && module.Add
|| module.Name == 'z' && module.Edit
|| module.Name == 'z' && module.Delete) {
return true;
}
else {
return false;
}
}