Created
November 25, 2019 22:45
-
-
Save parzibyte/a91f7ff5742870a00286efd21dd33962 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
eliminarMascota(mascota: Mascota) { | |
this.dialogo | |
.open(DialogoConfirmacionComponent, { | |
data: `¿Realmente quieres eliminar a ${mascota.nombre}?` | |
}) | |
.afterClosed() | |
.subscribe((confirmado: Boolean) => { | |
if (!confirmado) return; | |
this.mascotasService | |
.deleteMascota(mascota) | |
.subscribe(() => { | |
this.obtenerMascotas(); | |
this.snackBar.open('Mascota eliminada', undefined, { | |
duration: 1500, | |
}); | |
}); | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment