Then we add two routing function, first one is “/contact” which list all our contacts and “/contact/:userId” which returns one contact detail based on the userId we pass in. Finally we export the router to be used by the server module:

Looking at above code, you can see how easy it is to populate tables using ng-repeat and even use angular built-in sorting and search functionality. Run the server and you should see a list of contacts by first name and last name and sorting, searching functionality by simply clicking on the headers.