how to display sorted data from complete object in angular js?

后端 未结 2 1956
一生所求
一生所求 2021-01-27 06:15

I am trying to make demo of sorted data and display on table.Actually In my demo I am hitting a service got some data (2000) objects in that as a response.So I am display 50 obj

相关标签:
2条回答
  • 2021-01-27 06:21

    Just change order of limitTo and orderBy in your repeater

    orderBy: ... | limitTo : ...

     <div class="row" ng-repeat="column in invoice_records |  orderBy: sortval:reverse track by $index | limitTo: counter " ng-class-odd="'odd-row'">
    
    0 讨论(0)
  • 2021-01-27 06:31

    You can call the order by on the results from your service:

    $scope.total_invoice_records = $filter('orderBy')(data.records, 'columns['+idx+'].value', true)
    
    0 讨论(0)
提交回复
热议问题