0

I'm using dir-paginate for displaying records and pagination. for that I have created one function

$http.get("admission/getinfo").success(function(result){
    $scope.admissiondata = result;
});

and pass this data to dir-paginate. Now what's happens here suppose I have more than thousand records , all these records are get once, that's why it takes more time to fetch and display data. Now My question is . when user click the pagination that time next whatever records fetch. suppose I have set 10 for pagination then next 10 records is display in codeIgniter and angularjs

1 Answer 1

1

you should use limit,offset in your backend, like

$http.get("admission/getinfo?pageno=1").success(function(result){
   $scope.admissiondata = result;
});

and when page no change, use callback function on-page-change. Check this: https://github.com/michaelbromley/angularUtils/tree/master/src/directives/pagination#dir-pagination-controls

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.