I am working on ngx-pagination, here i have to display the number of records present in that particular page. For example: if i have set items per page as 10, then in page number 1, it must show 1-10, if page number 2: it must show 11-20, if items per page is 50, then it must be 1-49, 50-99 and so on..
HTML:
<pagination-controls (pageChange)="pageChanged($event)" class="my-pagination"></pagination-controls>
in table i am using pipe paginate, which links to ngx-pagination:
<tr *ngFor="let agent of agentList | paginate: config)">
in Ts:
public config = {
itemsPerPage: 10,
currentPage: 1,
totalItems: 0
};
here, if i am on page1, i need to show 1-10 are shown and so on