how to make a server side pagination in mean.io stack application.i.e express should load only 10 documents from 30 document available in mongodb,@ express level on pageload , on click of second page number (1,2,3) in pagination next 10 record should be fetch on click of third page next 10 record should be fetch.
Asked
Active
Viewed 2,512 times
2 Answers
0
You should start from updating mongoose models (described here).
Then add appropriate params to controllers.
To add pagination to angularjs use angular-ui-pagination

Community
- 1
- 1

Andrew Shustariov
- 2,530
- 1
- 17
- 17
-
thanks for the response , i have tried the same thing mentioned in the answer but my real challenge lies in how to link the express function with angular controller – user3207184 Jan 17 '14 at 16:13
-
i.e i want skip to be dynamic value that will come from url or some thing , please help.. – user3207184 Jan 17 '14 at 16:14
0
If you are using MEAN stack following blog post provides much of the information to create pagination in front end using angular-UI bootstrap and using mongoose skip and limit methods in the backend. this can also be applicable for MEAN IO.
see : https://techpituwa.wordpress.com/2015/06/06/mean-js-pagination-with-angular-ui-bootstrap/

Manoj Sanjeewa
- 1,069
- 1
- 11
- 34