0

Codepen demo

Need to have "Pune" as default selected option.

Here is the same question. I need help in knowing how should I add attribute in my current data structure for selected option.

<div ng-app="storeLocater"  ng-controller="selectOptions">
  <select ng-model="cities" ng-options="store for (store,city) in stores"> 
  </select>
</div>
Community
  • 1
  • 1

2 Answers2

0

You need to set the default value in your ng-model, which in your case is: cities

Ali Arshad
  • 436
  • 2
  • 12
0

Try this:

 <select  ng-model="stores.Pune" ng-options="store for (store,city) in stores">
 </select>
Beri
  • 11,470
  • 4
  • 35
  • 57
Reena
  • 1,109
  • 8
  • 16