I pulled an array from the controller through ajax, var fruits = ['apple', 'banana'], I hope to achieve the following effect:
<select>
<option value='apple'>苹果</option>
<option value='banana'>香蕉</option>
</select>
<select ng-options="fruit for fruit in fruits">
</select>
Got it
<select ng-options="fruit for fruit in fruits">
<option value="0" selected="selected" label="apple">apple</option>
<option value="1" selected="selected" label="apple">banana</option>
</select>
How to modify the value of value by modifying the ng-options tag?
Just use ng-repeat option...
In fact, there is a solution:
http://stackoverflow.com/questions/12139152/how-to-set-the-value-property-in-angularjs-ng-options
How to change fruit into an object array