Response from Sweet-alert confirm dialog
I have a function where i costumize my sweet-alert dialog. I want to use it in a lot of places and therefore set that in a function like: $rootScope.giveConfirmDialog = function(title,text,confirmButtonText,toBeExecFunction){ swal({title: title, text: title, ..... confirmButtonText: confirmButtonText }, toBeExecFunction); } What i want to do is simple: calling that function in somewhere and go on based on the answer of the user, thus: var res = $scope.$root.giveConfirmDialog("..", "test", "test", function () { return true; }); But i don't take any response. Actually, i couldn't find such an