I'm struggling with a particular issue in my code.
<select ng-model="selected_student" class="form-control">
<option ng-repeat="obj in students" value="{{obj.id}}">{{obj.name}}</option>
</select>
When I try to set the selected_student
in the controller
like this:
$scope.selected_student = $scope.students[0];
it doesn't seem to be working as expected.
If you would like to take a look at my code, here's the link to my fiddle