AngularJS Select Boxes
AngularJS allows us to create a drop-down list. We can insert options in it by using the ng-options directive. We can also use ng-repeat for inserting items in the select box but ng-options is specifically designed for this purpose.
The ng-repeat directive is used to repeat a set of HTML a given number of times. The set of HTML will be repeated once per item in a collection. The collection must be an array or an object. If the collection is in the form of objects, then ng-repeat is best for making an HTML table.
< element ng-repeat="expression" >< /element >
An expression that specifies how to loop the collection.
The ng-options directive is used to fill a select element with options. The ng-options directive uses an array to fill the dropdown list. It is better than ng-repeat as it is more flexible.
< select ng-options="array expression" >< /select >