Search code examples
angular6primengprimeng-turbotable

How to get row count using primeng turbotable with help of primeng


I have tried to display current table row count with total count i got total value count via #table.value.length but i can't able to get current page row count, I used turbotable in primeng. I need to display like blow image for total count/ row count i.e Tatal: 10/5.image


Solution

  • You are using pagination for the table. You can use rows and totalRecords state of pagination to display total count/ row count

    <p-table #tabel ...></p-table>
    
    {{table.totalRecords}}/{{table.rows}}