Read about your approach on another thread & tried to implement it to pop back to the loginPage from a presented Modal “Settings” page where the “logout” button user profile is
… Seemed like a good idea, but it had no effect.
Set up ReplaySubject in my userAuthSvc to send true/false if authorized. Subscribed to it in app.component, and it worked to see true/false for “authed” or not after logging in/out …
… But setting the Root Page for the app to either “LoginPage” or “TabsPage” in app.component accordingly had no effect. Was there a step missing? Is that alone supposed to trigger navigation? Not sure what the default behavior should be, but it didn’t do anything.
What did work was importing the App into the modal Settings page, getting the App’s root and popping to that. Messy, but it works.
Now I’m seeing the same deprecation warning that OP asked about over a year ago, with no solution. Good design or not, it’s kind of ridiculous that after over a year there’s no answer to such a straightforward question.
Apparently Ionic4 will completely change how navigation & routing works anyway so maybe it doesn’t matter?
This doesn’t work when the user enters the path to a specific page. The specific page is set before the rootPage in the app.component and then it gets overwritten.