I am building an Ionic 2 app using ngrx, but I have a problem in dismissing overlay components.
To login I show the user a modal with a login-form. This dispatches an action which is handled not in the page but somewhere else. If the login was successful I want to set a new root-page and dismiss all overlay components (in this case the modal). This cannot be done from within the modal component since all the logic is handled somewhere else.
I already tried: clearing the whole navigation stack, calling popToRoot() and some other things but nothing worked. The is not dismissed.
Is there a way to dismiss all the modals/page except the root-page? I would want to have something like this: