I have the below code for a delete button in the controller,
$scope.removes = function (scope) {
toastr.success("Delete all?","<br /><br /><button type='button' class='btn clear'>Yes</button>",{
closeButton: false,
onClick: function(){
var nodeData = scope.$modelValue;
if(nodeData.nodes.length > 0){
toastr.error('Cant delete Sub levels available :', 'Warning', {
closeButton: true
});
}else{
mainMenuService.deleteData(nodeData).success(function(data) {
scope.remove();
toastr.success(data.message, 'Message', {
closeButton: true
});
}).error(function(err) {
toastr.error(err, 'Warning', {
closeButton: true
});
});
}
}
})
}
I want to show a confirmation dialog box and want to delete if the use click yes button. But I can't see any button in the toastr message and I don't know how to do it. I have done it exactly as in the documentation. And I want to know if it is possible to put two buttons in the confirmation message?