Now I am going to explain that how can we achieve paging, sorting and filter in grid by using ng-table api of angularjs. In this article we will replace some code with previous tutorial so please download the code of previous article or you can follow the previous article in order to achieve.
Functionality we will achieve after doing this article:
Let’s start step by step so that we can achieve our objective at the end of this article. After completing this demo our application should look like this:
1) Include this package in your existing application:
It supports sorting, filtering and pagination. Header row with titles and filters automatic generated on compilation step.
2) Add the highlighted reference in your Index.cshtml file. This will add the reference of ngTable api of angularjs in our application. After adding this only we can use its sorting, paging and filter features.
3) In list.html, replace the code with the following. I highlighted some of the changes part so it will be easy for us identity the code of functionalities given by this tutorial.
4) In controller.js, only replace declaration section of EmpControllers and ListController definition.
Thanks for reading this article. I hope this will help you. If having any suggestion and feedback please provide by using comment box.