Skip to content

Instantly share code, notes, and snippets.

@ierhalim
Created July 27, 2021 18:20
Show Gist options
  • Save ierhalim/479149fcea534602b110b61d208cba11 to your computer and use it in GitHub Desktop.
Save ierhalim/479149fcea534602b110b61d208cba11 to your computer and use it in GitHub Desktop.
PrimeNG Table Template API
<p-table [value]="products">
<ng-template pTemplate="header">
<tr>
<th>Code</th>
<th>Name</th>
<th>Category</th>
<th>Quantity</th>
</tr>
</ng-template>
<ng-template pTemplate="body" let-product>
<tr>
<td>{{product.code}}</td>
<td>{{product.name}}</td>
<td>{{product.category}}</td>
<td>{{product.quantity}}</td>
</tr>
</ng-template>
</p-table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment