Skip to content

Instantly share code, notes, and snippets.

@bohoffi
Last active December 13, 2016 08:31
Show Gist options
  • Save bohoffi/7c414b053941e1d4ee253a25c33cc761 to your computer and use it in GitHub Desktop.
Save bohoffi/7c414b053941e1d4ee253a25c33cc761 to your computer and use it in GitHub Desktop.
Angular 2 paging component utilizing the router
<div>
<a *ngIf="currentPage > 1" [routerLink]="prevRouterLink" class="prev-link">{{prevLabel}}</a>
<span *ngIf="currentPage > 1 && currentPage < totalPages" class="sep">{{sep}}</span>
<a *ngIf="currentPage < totalPages" [routerLink]="nextRouterLink" class="next-link">{{nextLabel}}</a>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment