How to set the value attribute for select options?
What you first tried should work, but the HTML is not what we would expect. I added an option to handle the initial “no item selected” case: <select ng-options=”region.code as region.name for region in regions” ng-model=”region”> <option style=”display:none” value=””>select a region</option> </select> <br>selected: {{region}} The above generates this HTML: <select ng-options=”…” ng-model=”region” class=”…”> <option style=”display:none” … Read more