ranyeli
9/20/2017 - 1:12 AM

pagination template

<!-- {{eso}}
<input #data (click)="send(data.value)"> -->

<div class="pagination" *ngIf="count > 0">
    <!-- {{ getMin() }} of -->
  <span>Showed {{ getMax() }} of {{ count }}</span>
  <button (click)="onPrev()" [disabled]="page === 1 || loading">Previous</button>
  <button *ngFor="let pageNum of pages" (click)="onPage(pageNum)" [class.selectedPage]="page === pageNum">{{pageNum}}</button>
  <button (click)="onNext()" [disabled]="lastPage() || loading">Next</button>
  <span>{{ totalPages() }} pages</span> <span [ngClass]="{'glyphicon glyphicon-refresh glyphicon-refresh-animate': loading}" ></span>
</div>