meanstacktutorial icon indicating copy to clipboard operation
meanstacktutorial copied to clipboard

Server side pagination

Open shahzadthathal opened this issue 8 years ago • 5 comments

How I can use server side pagination? I have tried very hard but no success and there is no code which help you complete server side pagination,sorting and searching using mongodb, nodejs, angularjs.

shahzadthathal avatar May 17 '16 10:05 shahzadthathal

I might be of the mark, here but assuming your pushing data out as a table you could use https://datatables.net

I have used this in the past to sort, filter and paginate data.

Not fully sure your going to get Angular to do this as it being a single page application, but I am still a newbie at AngularJS so I could be wrong. Check the documentation for AngularJS I am sure it will have a method for providing this functionality.

brownsmart avatar May 17 '16 12:05 brownsmart

Hi, Thank you for your reply. I tried that but not success, may be a example of code can help me.

shahzadthathal avatar May 17 '16 14:05 shahzadthathal

Hi @shahzadthathal

could you be more specific, what exactly did you try?

brownsmart avatar May 17 '16 14:05 brownsmart

Hi

I have built this site but now issue is searching is not working.

https://mean-app-admin.herokuapp.com/admin/#/admin/login [email protected] 123456

shahzadthathal avatar May 17 '16 14:05 shahzadthathal

You can fork this repository and see the search function in ProductService.

https://github.com/shahzadthathal/mean-app-admin

or see this file:

https://github.com/shahzadthathal/mean-app-admin/blob/master/services/product-service.js

the function list(req) is for pagination,(searching, sorting is not working)

shahzadthathal avatar May 17 '16 14:05 shahzadthathal