In this article am going to explain how to use ng-options with simple and complex(array of objects) arrays
Assume you have following array
$scope.fruits = ['apple', 'banana', 'orange'];
If you want to show them in a dropdown using ng-options use the following code
<select name="fruit" data-ng-model="selectedFruit" data-ng-options="fruit as fruit for fruit in fruits"></select>
What you get in the resulting...