I have an angular service for handling modals:
angular.module(\'myApp\').service(\'ModalService\', function($uibModal) {
function open(options) {
retur
If you're using a controller within your modal. I used this on the closing event. Because 'Closing' is valid but 'Dismissing' is a rejection. This goes within your modal controller, not the parent.
$scope.$on('modal.closing', (event, reason, closed) => {
if (!closed) {
event.preventDefault();
$scope.$close("Closing");
}
});
So your backdrop click will fire the closing event but closed will be passed false. If that's the case, prevent the default behaviour, and programmatically close the modal instead of dismiss. Bare in mind this will break use of dismiss, if you want to use it for its original purpose.