In my angular application I want to display a message when the user tries to reload or leave the browser without saving his changes or when a background process is still running (according to a flag in my code).
However, The only option I found is to enable the default browser alert, with its default message: "Changes you made may not be saved."
I cannot find any way to override this popup.