Reputation: 29
Dropdown to get the options from json file. I'm getting the options but the value of the dropdown is shown as below.my question how to get the value is same as label ie., value="4.90a-ea02" label="4.90a-ea02"
<select name="version" class="form-control" ng-model="myObj.Version"
ng-options="item as item.version for item in contver| unique:'version'|orderBy: '-version'" >
Upvotes: 0
Views: 51
Reputation: 2021
<select name="version" class="form-control" ng-model="myObj.Version"
ng-options="item.version as item.version for item in contver| unique:'version'|orderBy: '-version'" >
Upvotes: 1
Reputation: 41397
just change the ng-options="item as item.version for
to ng-options="item.version as item.version for
<select name="version" class="form-control" ng-model="myObj.Version"
ng-options="item.version as item.version for item in contver| unique:'version'|orderBy: '-version'" >
Upvotes: 0