I'm starting with a sorting table and automatic filter with Angular. I want to use ng-table
The fact is that no matter how much I try I can not get the app to display rows, I get the format of the tables with its two input fields for the filters, but it does not show rows ..
Next the code
<body ng-app="main">
...
<div class="row" ng-controller="usuariosController as users">
<table ng-table="tableParams" class="table" show-filter="true">
<tr ng-repeat="user in users.data">
<td title="'Name'" filter="{ name: 'text'}" sortable="'name'">
{{user.name}}</td>
<td title="'Age'" filter="{ age: 'number'}" sortable="'age'">
{{user.age}}</td>
</tr>
</table>
</div>
....
(function () {
'use strict';
var myApp = angular.module('main', ['ngTable']);
myApp.controller('usuariosController', function (NgTableParams) {
var self = this;
var data = [{name: "Moroni", age: 50},
{name: "Simon", age: 43},
{name: "Jacob", age: 27},
{name: "Nephi", age: 29},
{name: "Christian", age: 34},
{name: "Tiancum", age: 43},
{name: "Jacob", age: 27}];
self.tableParams = new NgTableParams({ count: 5}, { counts: [5, 10, 25], dataset: data});
;
});
})();