*ngIf and *ngFor
*ngIf – if the expression is evaluated as a true or false value
<table class='table' *ngIf='clients && clients.length'>
If the data is absent then nothing will be displayed.
*ngFor – use to repeat an element and its children in the dom for each element in the iterable list.
<tr *ngFor='#client of clients'>
<td>{{ client.clientName}}</td>
<td>{{ client.clientLastName}}</td>
<td>{{ client.zip}}</td>
</tr>
No comments:
Post a Comment
If you have any doubts or questions, please let us know.