I have the below event in one of the angular controllers. I get a prompt with 2 options "leave this page" or "stay on this page" when it hits the below beforeunload event. Is it possible to not to display the options at all and just silently prevent the refresh? Thank you for any suggestions.
var windowElement = angular.element($window);
windowElement.on('beforeunload', function (event) {
event.preventDefault();
event.stopPropagation();
});