Skip to content

Instantly share code, notes, and snippets.

Last active December 26, 2020 07:43
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
5. Active class added for page buttons
<div class="d-flex justify-content-between align-items-center">
<div class="records-count d-sm-block text-secondary">
Showing {{ pager.startIndex + 1 }} to {{ pager.endIndex + 1 }} of
{{ totalRecordsCount }} entries
<nav class="pages">
<ul class="pagination">
<li [ngClass]="{ disabled: currentPageNumber === 1 }" class="page-item">
<a href="javascript:;" class="page-link" (click)="prev()">Previous</a>
[ngClass]="{ 'custom-disabled active': currentPageNumber === page }"
*ngFor="let page of pager.pages; trackBy: trackByFn"
<a class="page-link" href="javascript:;" (click)="getData(page)">{{
[ngClass]="{ disabled: currentPageNumber + 1 > totalPages }"
<a class="page-link" href="javascript:;" (click)="next()">Next</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment