Check out this angular.js example I created to demonstrate my issue: example
I am trying to set the initial value of a select element to a specific value.
<select name="i" id="i" ng-model="selectedItem">
<option ng-repeat="i in items" value="{{i}}">{{i}}</option>
</select>
The options and the select element are being displayed correctly. However, even when I set the value to 6 in my controller, the selected value on the page remains the first element.
scope.selectedItem = 6;
There are two simple buttons that can change the selected value with no issues.
UPDATE: I have updated the jsfiddle by removing unnecessary code and providing clearer names for better understanding.
UPDATE 2: Can someone help me figure out how to fix the second select element as well? This time, the array contains objects instead of numbers.
<select name="o" id="o" ng-model="selectedItem">
<option ng-repeat="o in objects" ng-value="{{o.ID}}">{{o.Text}}</option>
</select>