i am using the same form to edit many records existing in an ng-repeat. When I click the edit buttom, i just do the following:
$('#EvaluationQuestionId').val($scope.data.EvaluationQuestion[$index].id);
$('#EvaluationQuestionEvaluationTopicId').val($scope.data.EvaluationQuestion[$index].evaluation_topic_id);
$('#EvaluationQuestionName').val($scope.data.EvaluationQuestion[$index].name);
The form inputs are filled correctly but i do not understand why, the AngularJs model is not updated as it does when you type in those inputs manually and invalid tags are kept until you write anything or select another choice in the populated select input.
I have tryed
$scope.$apply();
and also before the form...
$scope.evaluationFormQuestions.$setPristine(true);
But i am out of energy and ideas already...