How to render an ngTable without the pagination decorations?

狂风中的少年 提交于 2019-12-02 20:19:29

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
});

Use this approach (based on this link) :

$scope.tableParams = new ngTableParams({
        page: 1,   // show first page
        count: 5  // count per page
    }, {
        counts: [], // hide page counts control
        total: 1,  // value less than count hide pagination
        getData: function($defer, params) {
            $defer.resolve(data);
        }
    });
dcool

You could hide it with css:

.ng-table-pager {
    display: none;
}

Override your table declaration by including the attribute template-pagination="custom/pager" This allows you to add pagination around your table, or not include at all.

. . .
$scope.tableParams = new ngTableParams({
    noPager: true // hides pager
},{
    ...
});

after many tries, this method helps me. You can find the condition of pagination control's ng-show is "!noPager" in your dev console.

This worked for me. I called NgTableParams of gridParams and after load data I put

gridParams.total(0);

For completeness, CSS to only hide the pagination immediately following the table:

table.ng-table + div[ng-table-pagination]{
    display: none;
}

This worked for me, very basic using style="display:none".

<mat-paginator style="display:none" [length]="recordCount" [pageSize]="pageSize"></mat-paginator>   
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!