In a hybrid application with Ionic 3 I have 3 pages that are part of the process of buying a product.
The process is as follows:
We can imagine a diagram like this:
If you are logged in
[CART] = > [CHECKOUT]
If you are not logged in
[CART] = > [AUTHENTICATION] = > [CHECKOUT]
The problem is that if I am at the checkout after I have authenticated and go back to the previous page it returns to the authentication page and I would like it to skip it and return to the cart
I tried numerous variations of the code below without success:
// Após autenticar com sucesso
this.navCtrl.push("CheckoutPage").then(() => {
const index = self.navCtrl.getActive().index;
self.navCtrl.remove(index);
});
How can I remove a page from Ionic 2/3 navigation?