title: AngularJs ng-checked using a function
body: <p>I have a form and I am trying to use a function in input <code>ng-checked=&quot;someFunction()&quot;</code> 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' ?</p>
  <pre><code>$scope.multiAnswers = function (answers, optionId) {
    angular.forEach(answers, function (answer, key) {
      if (answer.option_choice_id == optionId) {
        return true;
      }
    });
    return false;
  };
  </code></pre>