Created
April 16, 2020 12:30
-
-
Save CoreProgramm/1bdd611e802c50c856158550574ece5d to your computer and use it in GitHub Desktop.
Angular ngFor trackBy
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
<table> | |
<thead> | |
<tr> | |
<th>Customer ID</th> | |
<th>Name</th> | |
<th>Address</th> | |
<th>Phone</th> | |
<th>Email</th> | |
<th>Gender</th> | |
</tr> | |
</thead> | |
<tbody> | |
<tr *ngFor='let cust of customers'> | |
<td>{{cust.cust_code}}</td> | |
<td>{{cust.cust_name}}</td> | |
<td>{{cust.Cust_address}}</td> | |
<td>{{cust.Cust_phone}}</td> | |
<td>{{cust.Cust_email}}</td> | |
<td>{{cust.Cust_gender}}</td> | |
</tr> | |
<tr *ngIf="!customers || customers.length==0"> | |
<td colspan="7"> | |
No Customer to display | |
</td> | |
</tr> | |
</tbody> | |
</table> | |
<button (click)='getCustomers()' >Get New Customers</button> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment