I am currently working on implementing custom filtering in ngTables, similar to this example. I have a set of columns with standard text input filters, but for some of them, I want to utilize my own filtering function instead of the default angular
$filter('filter')(array, params.filter())
. I would like to use something like $filter('myOwnFilter')(array, params.filter())
Filtering is handled in my controller:
var orderedData = params.filter() ? $filter('filter')(array, params.filter()) : array;
This is what I currently have in the code:
<td class="text-left" data-title="'Name'" filter="{ 'Column': 'myOwnFilter' }" data-sortable="'Column'">
{{ array.Column }}
</td>
And here is the template section:
<script type="text/ng-template" id="ng-table/filters/myOwnFilter.html">
<input type="text" name="myOwnFilter" data-ng-model="params.filter()[name]" data-ng-if="filter == 'myOwnFilter'" class="input-filter form-control"/>
</script>