Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(filters): url to filter template defined by the filter value rat…
…her than a separate templateUrl field This both simplifies and enhances the api for defining filters: * A filter value that contains a '/' will now be treated as the url to the filter template * A filter value *without* a '/' will be considered an alias to a filter defined in the ng-tables/filters folder * Multiple filters defined by the *same* filter definition can now specify their own template url BREAKING CHANGE: * column.filterTemplateURL has been dropped as this is no longer applicable. **Custom** *header.html* templates will need to change. Previously: ```` <tr class="ng-table-filters" ng-init="tableParams"> <th ng-repeat="column in columns" ng-show="column.visible" class="filter"> <div ng-repeat="(name, filter) in column.filter"> <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> </th> </tr> ```` ... now becomes: ```` <tr class="ng-table-filters" ng-init="tableParams"> <th ng-repeat="column in columns" ng-show="column.visible" class="filter"> <div ng-repeat="(name, filter) in column.filter"> <div ng-if="filter.indexOf('/') !== -1" ng-include="filter"></div> <div ng-if="filter.indexOf('/') === -1" ng-include="'ng-table/filters/' + filter + '.html'"></div> </div> </th> </tr> ```` * Specifying the url to a filter template has changed. Previously: ```` <td filter="{ 'name': 'text', templateURL: 'path/to/textFilter.html'}"</td> ```` ... now becomes: ```` <td filter="{ 'name': 'path/to/textFilter.html'}"</td> ```` * Multiple filters defined by the *same* filter definition will now specify their own url. Previously: ```` <td filter="{ 'fname': 'text', 'lname': 'text', templateURL: 'path/to/textFilter.html'}"</td> ```` ... now becomes: ```` <td filter="{ 'fname': 'path/to/textFilter.html', 'lname': 'path/to/textFilter.html'}"</td> ````
- Loading branch information