I am new to PrimeNG and current using PrimeNG table. I have been using @for to loop through content and populate table
Example:
@for (item of items; track item.id){
<tr>
<td>{{item.type || 'N/A'}}</td>
<td>{{item.name || 'N/A'}}</td>
<tr>
Based on PrimeNG example. It loops through using ng-template:
<ng-template pTemplate="body" let-item>
<tr>
<td>{{ item.type }}</td>
<td>{{ item.name }}</td>
<tr>
</ng-template>
I am using Angular 17.3.2. Would like to understand what’s the difference and how can I use @for with primeng table.
Want to understand what’s the difference and how can I use @for with primeng table.