Code: Select all
<p-table [value]="tecnicos"
selectionMode="single" [paginator]="true" [rowsPerPageOptions]="[5,10,15]" [rows]="5" [responsive]="true"
paginatorPosition="bottom">
<ng-template pTemplate="caption">
Lista de Tecnicos
</ng-template>
<ng-template pTemplate="header">
<tr>
<th>Nome</th>
<th>CPF</th>
<th colspan="2">Ações</th>
</tr>
</ng-template>
<ng-template pTemplate="body" let-tec>
<tr>
<td>{{tec.nome}}</td>
<td>{{tec.cpf}}</td>
<td>
<button pButton type="button" class="ui-button-warning " [routerLink]="['/tecnicoCadastro',tec.id]" icon="fa fa-pencil" title="Alterar"
pTooltip="Alterar" tooltipPosition="top"></button>
</td>
<td>
<button pButton type="button" class="ui-button-danger " icon="fa fa-trash" (click)="deletar(tec.id)" pTooltip="Excluir" tooltipPosition="top"></button>
</td>
</tr>
</ng-template>
</p-table>