0

我正在通过使用 ui-select2="" 创建一个下拉列表,我如何将列表项排序到结果中

html:

<input  style="width:100%"  type="text" ui-select2="selectuiOptions"     
 data-placeholder="Select or Add Process/Ingredient">

js:

    $scope.selectuiOptions = {
            data : $scope.processes,
}

我如何将列表元素排序到结果中

4

1 回答 1

0

这是示例:

function MyCtrl($scope, orderByFilter)

var isReverse = true,
    propertyName = 'myProperty';

$scope.selectuiOptions = {
   data : orderByFilter($scope.processes, 'propertyName', isReverse),
   ...
}
于 2014-01-17T10:34:53.987 回答