Ng-table: total number of rows in the ng-table?

Created on 4 Apr 2014  ·  5Comments  ·  Source: esvit/ng-table

My application needs to print out the total number of rows in the ng-table. Can someone help? Thanks.

Most helpful comment

use {{ tableParams.total() }}

All 5 comments

You can call

{{ tableParams.count() }}

Thank you for your suggestion. I tried your suggestion and unfortunately it did not work. It always gave me a constant (13), regardless how many rows that I have. I have tried various other ways, {{data.length()}}, etc. I could not figure out a way to get the total number of rows.

Can you post code online

I assume you are using a dynamic source and that is why you do not know how many records are there. ngTable will only be able to tell you how much data is on the current data set, but your back end must tell you (and then you tell ngTable) the total amount of records; you can see it in action here

use {{ tableParams.total() }}

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ivyfae picture ivyfae  ·  12Comments

Ebolon picture Ebolon  ·  12Comments

yujiayinshi picture yujiayinshi  ·  8Comments

zymr-keshav picture zymr-keshav  ·  10Comments

andreicristianpetcu picture andreicristianpetcu  ·  6Comments