Angular Interceptor and dialogs

744 Views Asked by At

So we have an HTTP Interceptor that will prompt the user with a dialog (requiring a button press).

My question is how do I allow my UI Component to interface with the Http Interceptor to close this dialog if I wanted to. We are currently capturing BACK/FWD button presses and prompting if unsaved data is found. At the same time the back end service could have prompted with a dialog and the user simply wants to go back to his last page. That dialog is still up and I can't find a solution for how to close it. I've added a dialogRef to the HTTP inteceptor and a close() method to close it but I'm not seeing anyone who actually does anything like this?

0

There are 0 best solutions below