Hello everyone.
Let's dive right into the issue - I am trying to figure out how to pass a variable back from an AngularJS UI Boostrap Modal when the user clicks on the background or presses the ESC button on their keyboard.
There are some solutions available to prevent the user from closing the modal prematurely, which you can find here: How do I prevent angular-ui modal from closing?
However, in my particular case, I believe preventing the user from doing so might actually cause them to get stuck. This is because there is only one button that triggers the action
$uibModalInstance.close($scope.choosenLocationLatLng);
. Therefore, I am looking for a way to pass the variable back not just when the button is clicked, but also when the user clicks on the background or hits the ESC key on their keyboard, if possible.