When you try to use filter="{Data:{Str1: 'text'}}" in html, the input does not show the reason for the template in the header, see the source code .
<div ng-repeat="(name, filter) in column.filter"> //!!!! right here it not supported <div ng-if="column.filterTemplateURL" ng-show="column.filterTemplateURL"> <div ng-include="column.filterTemplateURL"></div> </div> <div ng-if="!column.filterTemplateURL" ng-show="!column.filterTemplateURL"> <div ng-include="'ng-table/filters/' + filter + '.html'"></div> </div> </div>
right here <div ng-repeat="(name, filter) in column.filter"> it doesn't break into nested objects
Ngtable does not support the nested filter in the default template, so you can create your own template that will support it. Take a look at an example header template .
Note
This is how column.filter initialized, it parses the filter attribute on the td tag, source
var parsedAttribute = function (attr, defaultValue) { return function (scope) { return $parse(el.attr('x-data-' + attr) || el.attr('data-' + attr) || el.attr(attr)) (scope, { $columns: columns }) || defaultValue; }; }; var parsedTitle = parsedAttribute('title', ' '), headerTemplateURL = parsedAttribute('header', false),
source share