I build a control using an Object that I get it from external source.
var field= {
"attributeName": "Country",
"dbColumnName": "location",
"fieldType": "DROP_DOWN",
"optionName": ['US', 'AUS', 'UK', 'IND'],
"optionValue": ['123','456','789','0123']
}
Control is created from above object
<select name="{{field.attributeName}}" ng-model="formControlsValues[field.dbColumnName]"/>
<option ng-repeat="item in field.optionName track by $index" ng-value="field.optionValue[$index]">
{{item}}
</option>
</select>
field.optionName is an Array and item will be a display value. field.optionValue[$index] is another array mapped for values.
Marking default value in Selectbox while using above two arrays in Angular, how can it be achieved ?