In Part 4 of this series, I added sorting to the table. In this blog post I will add a search box which allows users to search for customers by first name or last name. Whenever a user types something into the search box we will automatically trigger a new request to the API to filter the customers based on the text the user entered. Add a search box The first step is very simple and that is to add a text box to the existing page.
In Part 3 of the series we finally added ngTable into the mix which allows us to display the data in a table and also page through the data. In this blog post we will look at adding sorting capabilities to our table. Setting ngTable up for sorting Allowing users to sort by a column in ngTable is as easy as adding a data-sortable attribute to each column for which we want to allow sorting.
In Part 2 I created an ASP.NET Web API with a single method that returns a list of customers. I then went on to show how to use Restangular to retrieve the list of customers and display them. In this blog post I will change the API method which retrieves the list of customers to allow for paging. Fix JSON formatting The first thing I want to do however is make a small change to the API.