Sometimes things go wrong, and I want to listen to my Api and Auth services for authentication errors, so if authentication expires for some reason (token expired, remote logout, bugs, etc.) and in that case, push the user to LoginPage or even just show an alert. Point is, access the view layer.
In pure Angular I would use a DispatchPage, a component that contains all other page components. So, the DispatchPage is always loaded and can handle this kind of logic.
But in Ionic, even if I use create a DispatchPage for my rootPage and begin navigation from there, livereloading or accessing the page directly (ie. by url) will load a given page directly, and DispatchPage is never loaded.
So is there a way to make sure Dispatch Page is always loaded in any navigation scenario, or perhaps someone has a better solution for this kind of behavior in general?
AppComponent would seem a good place for this, but NavController, AlertController, etc. are not available from here.