Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created November 25, 2019 22:45
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
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