For some reason I fail to understand, my select element (with ng-repeat) does not display the value that was retrieved from the DB.
The source markup is:
<select class="form-control"
id="Test_Method_Select_{{$index}}"
ng-model="One_Source.Test_Method_Code"
style="width:150px">
<option ng-repeat="One_Method in One_Source.Formatted_Test_Methods_List" value="{{One_Method.Value}}">
{{One_Method.Value}} - {{One_Method.Name}}
</option>
</select>
and the generated (by AngularJS) markup is:
<select class="form-control ng-pristine ng-valid ng-not-empty ng-touched"
id="Test_Method_Select_1"
ng-model="One_Source.Test_Method_Code"
style="width:150px">
<option value="? number:26 ?"></option>
<!-- ngRepeat: One_Method in One_Source.Formatted_Test_Methods_List -->
<option ng-repeat="One_Method in One_Source.Formatted_Test_Methods_List" value="103" class="ng-binding ng-scope">103 - LC-MS-MS</option>
<!-- end ngRepeat: One_Method in One_Source.Formatted_Test_Methods_List -->
<option ng-repeat="One_Method in One_Source.Formatted_Test_Methods_List" value="26" class="ng-binding ng-scope">26 - Pesticides - GCMS</option>
<!-- end ngRepeat: One_Method in One_Source.Formatted_Test_Methods_List -->
<option ng-repeat="One_Method in One_Source.Formatted_Test_Methods_List" value="29" class="ng-binding ng-scope">29 - Aldicarb - LLE,GCMS</option>
<!-- end ngRepeat: One_Method in One_Source.Formatted_Test_Methods_List -->
</select>
The element does not display 26 - Pesticides - GCMS even though is the value shown to be the received one.
Edit
Using Markus' suggestion, the source markup now looks as follows:
<select class="form-control"
id="Test_Method_Select_{{$index}}"
ng-model="One_Source.Test_Method_Code"
style="width:150px"
ng-options="item.Value as (item.Value + '-' + item.Name) for item in One_Source.Formatted_Test_Methods_List">
</select>
Still, the selected value is not shown (note: I added Value from model: {{One_Source.Test_Method_Code}} just before the element and the correct value is shown, but not in the select element).