Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49240

[Ionic 4] Remove page from navigation (Router / NavController)

$
0
0

@joanroig wrote:

Hi, I’m using both methods when navigating, this one when I need to pass parameters:

this.router.navigate(['categories/', categoryId], { queryParams: { title: name } });

And this one when not:

this.navCtrl.navigateForward('home');

My App logic is something like this (arrows define the allowed direction of navigation):
Login > Home >< Categories
So when the user goes to Home I block going back to Login by closing the app.

The problem here is that the user can log out, and the app navigates to Login again. In this step, if the user has been logged in, and then used the logout, the Login page is reused and its constructor is not called again.

Is there any way to remove this view from history navigation and force rebuilding it for calling the constructor? I’m currently going to Login again using navigateForward and I emulate the behaviour that I expect putting my code in ionViewDidEnter.

I’m using:

    "@ionic/angular": "^4.0.0-beta.12",
    "ionic": "^4.1.2",

Thanks in advance.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49240

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>