2016-11-30 13 views

答えて

3

そのフィールドにorderByフィルタを適用しています。ソートについてはhereをご覧ください。あなたは何ができるか

ng-repeat="damageResult in damageResultList | orderBy:'YOUR_FIELD_NAME'" 
1

は、並べ替え、ケースフィールドに番号にテキストを変換するために、カスタム関数を定義する数

$scope.sorterFunc = function(entity){ 
    return $scope.isFieldNumber? parseInt(entity[$scope.property], 10) : entity[$scope.property]; 
}; 

されている、その後、NG-繰り返しで

<div ng-repeat="entity in entityArray | orderBy:sorterFunc "> 
関連する問題