Created
November 25, 2019 22:02
-
-
Save parzibyte/7ee12b447fb12c071adf21b803e03b31 to your computer and use it in GitHub Desktop.
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
<h2>Listado de mascotas</h2> | |
<table mat-table [dataSource]="mascotas" class="mat-elevation-z8" style="width: | |
100%;"> | |
<ng-container matColumnDef="nombre"> | |
<th mat-header-cell *matHeaderCellDef>Nombre</th> | |
<td mat-cell *matCellDef="let mascota"> {{mascota.nombre}} </td> | |
</ng-container> | |
<ng-container matColumnDef="raza"> | |
<th mat-header-cell *matHeaderCellDef>Raza</th> | |
<td mat-cell *matCellDef="let mascota"> {{mascota.raza}} </td> | |
</ng-container> | |
<ng-container matColumnDef="edad"> | |
<th mat-header-cell *matHeaderCellDef>Edad</th> | |
<td mat-cell *matCellDef="let mascota"> {{mascota.edad}} </td> | |
</ng-container> | |
<ng-container matColumnDef="editar"> | |
<th mat-header-cell *matHeaderCellDef>Editar</th> | |
<td mat-cell *matCellDef="let mascota"> | |
<a mat-icon-button [routerLink]="['/mascotas/editar', mascota.id]"> | |
<mat-icon color="primary">edit</mat-icon> | |
</a> | |
</td> | |
</ng-container> | |
<ng-container matColumnDef="eliminar"> | |
<th mat-header-cell *matHeaderCellDef>Eliminar</th> | |
<td mat-cell *matCellDef="let mascota"> | |
<button (click)="eliminarMascota(mascota)" mat-icon-button> | |
<mat-icon color="warn">delete</mat-icon> | |
</button> | |
</td> | |
</ng-container> | |
<tr mat-header-row *matHeaderRowDef="['nombre', 'raza', 'edad', 'editar', | |
'eliminar']"></tr> | |
<tr mat-row *matRowDef="let fila; columns: ['nombre', 'raza', 'edad', | |
'editar', 'eliminar'];"></tr> | |
</table> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment