Trying to get a message for user before he click back button from the browser and go out from the app. in my app user cant go back unless he use the buttons inside the app. so i want to pop up some message when the user use back button from the browser.
i managed to get event of the click back button but cant get a pop up to pops after.
window.onpopstate = function (e) {
this.dialog.open(PopupComponent, {
data: {
data: optionsBox,
hint: 'test',
}
});
}
getting error: Property 'dialog' does not exist on type 'WindowEventHandlers'.ts(2339)