I have a form and I am trying to use a function in input ng-checked="someFunction()"
and I don't know if this is possible or I am doing something wrong. I have function in my controller and I am calling it in view. As far as the function I think it's definitely working and the ng-checked is firing it but returning true or false doesn't change anything. So the question would be is there a way to use function in 'ng-checked' ?
$scope.multiAnswers = function (answers, optionId) {
angular.forEach(answers, function (answer, key) {
if (answer.option_choice_id == optionId) {
return true;
}
});
return false;
};