The filters on ng-repeat
will only filter the raw data, this is how ng-repeat
works. To filter on the output from the filters in your table data cells, I can see two options:
Attach prefiltered values for date and currency to the objects you are filtering. In order to keep things somewhat DRY, you can use the filters themselves for this purpose, in a controller or elsewhere fitting:
object.currencyFlat = $filter('currency')(object.total);
Build a custom filter dynamically filtering on the value you present visually in the table:
angular.module('myModule').filter('myCurrencyFilter', function($filter) { return function(array, text) { // Could be more sophisticated return array.filter(function(item) { return $filter('currency')(item).indexOf(text) !== -1; }); } });
Of these two, the first would be much quicker, as it only formats the object's total as a currency once.
I think neither of these approaches are particularly beautiful. I would love to see a better solution.