Angularjs实现下拉列表排序

<select class="form-control underline" ng-model="reportform.score" ng-options="score.value as score.name for score in scoreOptions|orderBy:col " style="margin: 0;padding: 0"></select>
$scope.col = 'name';
$scope.scoreOptions = [
{ name: '3.75', value: '1' },
{ name: '3.5', value: '2' },
{ name: '3.25', value: '3' },
{ name: '3.0', value: '4' },
{ name: '4.0', value: '5' }, 
{ name: '5.0', value: '6' }];

参考排序文章Angularjs轻松实现表格按指定列排序

posted @ 2017-04-05 17:40  知九  阅读(1265)  评论(0编辑  收藏  举报