How to render an ngTable without the pagination decorations?

David M. Karr picture David M. Karr · Mar 15, 2014 · Viewed 28.7k times · Source

In my small AngularJS app, I render several tables using the ngTable library. Only one could use pagination. The others will always fit on less than a page. Every rendered ngTable seems to add the "10 25 50 100" selector below the table. For most of my tables, this is wasted space and is nonfunctional. How can I remove that section and get that space back?

Answer

XeroxDucati picture XeroxDucati · Mar 15, 2014

This was recently fixed (https://github.com/esvit/ng-table/issues/6) This code should do it for you (copied from same git issue):

$scope.tableParams = new ngTableParams({
    count: items.length // hides pager
},{
    counts: [] // hides page sizes
});