I create a custom button inside a footer in Sweetalert2 like this.
Swal.fire({
icon: "question",
showCancelButton: true,
confirmButtonColor: "#1976d2",
cancelButtonText: "No",
confirmButtonText: "Sí",
footer: "<button (click)='withoutread()' class='btn btn-info'>Test</button>"
})
withoutread() {
console.log('hello');
}
The problem: The function withoutread
doesn´t call properly, console.log('hello')
doesn´t show hello in console.
So: What´s wrong in this code?