Created
December 21, 2018 11:18
-
-
Save azaharafernandezguizan/07ed249c22a5a8a2681653b0ab8e74d8 to your computer and use it in GitHub Desktop.
Angular table with pagination and sorting.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div> | |
<ul> | |
<li (click) = "sortTable('name')"> | |
nombre | |
<i [class]="getIcon('name')" aria-hidden="true"></i> | |
</li> | |
<li (click) = "sortTable('lastname')"> | |
apellidos | |
<i [class]="getIcon('lastname')" aria-hidden="true"></i> | |
</li> | |
<li (click) = "sortTable('email')"> | |
teléfono | |
<i [class]="getIcon('email')" aria-hidden="true"></i> | |
</li> | |
<li (click) = "sortTable('course')"> | |
<i [class]="getIcon('course')" aria-hidden="true"></i> | |
</li> | |
</ul> | |
<ul *ngFor="let student of studentsList | sortPipe:path:order"> | |
<li>{{student.name}}</li> | |
<li>{{student.lastname}}</li> | |
<li>{{student.email}}</li> | |
<li>{{student.course}}</li> | |
</ul> | |
<div> | |
<ngb-pagination *ngIf="showPagination" [collectionSize]="totalItems" [(page)]="page" | |
(pageChange)="loadPage($event)"></ngb-pagination> | |
</div> | |
</div> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment