The question is how do I delete a record that has a key composed with the http delete method? the code that I have so far is
delete(categoria, i) {
console.log(categoria);
const cat = new CategoriaLugar(categoria.id_lugar, categoria.id_categoria, categoria.Lugar.nombre, categoria.Categorium.nombre)
console.log(cat);
const id = [categoria.id_lugar, categoria.id_categoria]
if (confirm("¿Está seguro que desea eliminar la categoria " + cat.nombre_categoria + " del lugar " + cat.nombre_lugar + "?")) {
this.service.deleteCategoria(cat).subscribe(
result => delete this.categorias[i],
error => alert("Error al eliminar")
);;
}
}
However, I can not get you to delete the data