AngularJS Table with Double Sorting

Author: ejsado
Official Page: Go to website
Publish Date: February 22, 2016
License: MIT


Normal Angular table sorting does not allow you to sort by two data fields that are in the same column. Angular table filtering and pagination removes table rows from the DOM, resetting any actions the user has made (ex: checking a box in the row). This table hides the rows instead of removing them, preserving their states.

The Angular filter does not allow you to search month names within a date because a date object does not contain the month names. Similarly, with boolean attributes, the user can only search for ‘true’ or ‘false’. I circumvent this by adding data attributes in the form of strings. You can filter by any of the text visible in the table. Filtered rows are kept in the DOM.


AngularJS Table with Double Sorting

You Might Be Interested In:

Add Comment