ng-table
ng-table copied to clipboard
Sorting Column with Boolean Data
Is there any possibility to sort column with boolean data? I want to display a list of documents in table, docs have 'isRead' property (value true or false).
I tried
$scope.tableParams = new ngTableParams(
{
page: 1,
count: 10,
sorting: {
IsRead: 'asc'
}
},
but it doesn't work.
+1
it's working.
I did this in controller, in getData function after ajax call (the obejcts proparty to sort by is 'IsNew'):
var orderedData = $filter('orderBy')(docs, ['-IsNew']);