HTML code
<div>
<label for="name">School Name</label>
<select ng-model="SelectedSchoolIDEdit"
ng-options="option.Name for option in SchoolAvailableOptions track by option.ID"></select>
</div>
Angular code
SchoolGradesService.GetAllSchools().then(function (d) {
$scope.SchoolAvailableOptions = d.data;// Success
$scope.SelectedSchoolIDEdit = $scope.SchoolAvailableOptions[0].ID;
}, function () {
alert('Error Occured !!!'); // Failed
});
The situation like that i get data successfully and i can fill the drop down list but The problem is that I cant set the default value on it And I search a lot and i see the same what I do ,SO I cannot catch the problem Note: I am new with Angular