Please suggest different methods to implement server side pagination using angular js and angular-ui bootstrap. I would be paginating a table listing using ng-repeat according to current page selected in angualr-ui bootsrap pagination directive. Since we need to avoid frequent calls to server. We need to fetch 50 items from server at a time. We are showing 10 items per page.Since we need to paginate to larger datasets we need to keep the ng-repeat model to always contain 50 items for performance reasons.
Dismiss
Announcing Stack Overflow Documentation
We started with Q&A. Technical documentation is next, and we need your help.
Whether you're a beginner or an experienced developer, you can contribute.
|
DirPaginate is something that'll meet the requirements of this question Please see this Plunker for demo of this. When using server side pagination, you'll have to get JSON response in this format. Format of your JSON response
The only thing that you need to watch is that you get total count of items in your database because you'll need this to pass it to our directive. Format of your angular Controller
and finally this is an example of how you'll integrate it in your html HTML
Please see Working with Asynchronous data section of this page. |
||||
|