Code licensed under New BSD License.
This directive allow to liven your tables. It support sorting, filtering and pagination. Header row with titles and filters automatic generated on compilation step.
- I abandoned from CoffeeScript in favor of a javascript, fully agree with http://blog.ponyfoo.com/2013/09/28/we-dont-want-your-coffee & (rus) http://habrahabr.ru/post/195944/
- added examples of table with grouping
- fully rewrited interface of ngTableParams
In functions that return data for the filters were removed .promise
$scope.names = function(column) {
...
def.resolve(names);
// return def.promise; - old code
return def;
};
bower install ng-table
- Pagination
- Sorting
- Filtering
- Cell template
- Row template
- Params in url
- Ajax
- Custom template(pagination)
- Custom filters
- Table with checkboxes
<table ng-table="tableParams" show-filter="true">
<tr ng-repeat="user in users">
<!-- IMPORTANT: String titles must be in single quotes -->
<td data-title="'Name of person'" filter="{ 'name': 'text' }" sortable="name">
{{user.name}}
</td>
<td data-title="'Age'" filter="{ 'action': 'button' }" sortable="age">
{{user.age}}
</td>
</tr>
</table>