jquery-confirm
jquery-confirm copied to clipboard
How Can I Call a function in angular 8 from functiona asociated to button
jquery-confirm version: v3.3.4
And Angular version 8.3.17.
I'm submitting a ... (check one with "x") [ ] bug report [ ] feature request [ x] support request
Current behavior:
Expected behavior:
Steps to reproduce: I would like call to function of my controler when the user click on a button, but Chrome show an error error becuase doesn't find the function deleteReposition().
I think the error is becauese the scope is diferent from jquery and Angular, but I dont find the solution
Related code:
confirmDeleteReposition(){
var a = $.confirm({
lazyOpen: true,
columnClass: 'medium',
draggable: true,
type: 'red',
title: 'Confirmación',
closeIcon: true,
icon: 'glyphicon glyphicon-ok',
content: '¿Deseas borrar el Registro de Reposición?',
buttons: {
si: function(){
// I need call to this function to delete information in data base in Oracle
this.deleteReposition();
},
no: function(){
}
},
onAction: function (btnName) {
// when a button is clicked, with the button name
this.
alert('onAction: ' + btnName);
}
});
a.open();
}
insert any relevant code here
**Other information:**
I tested with callbacks but I dont 't find the solution
Please can you help me?, this library will be powerfull for my project
It's possible this situation is similar for a lot people in the world.
Best regard
