下拉以从json文件中获取选项。我得到了选项,但下拉列表的值显示如下。我的问题是如何获得该值与标签相同,即。,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'" >
答案 0 :(得分:1)
cron
答案 1 :(得分:0)
只需将ng-options="item as item.version for
更改为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'" >