-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NavController.remove() doesnt work as expected. #8442
Comments
same problem for me here.
I tried to remove the nav.remove from inside the promise but it didn't work either |
Do we have any official hint how to handle this in the meantime? Our navigation is heavily based on this function. We have pretty hard time figuring out how to solve this efficiently without making big modifications to our current navigation. |
@rodriguesgm can you explain the effect you are going for there? You want to push a new page and then once that's pushed, remove the page you just came from? I just tested this and the case of removing |
Weird, this does appear to only break for me once the stack is >= 5. Anyone have a test project to share? I'm not seeing any issues when stack < 5. |
I found the issue, fixing |
Thanks for the info everyone, this is fixed and will be in the next release. |
Hi @mlynch, thanks for the fix! Been trying to debug this for a couple hours, glad to see this issue has been resolved. Would love for it to be released very soon however :) :) :) |
There's a regression on this ? I have still this issue |
There's a regression on this ? I have still this issue this.navCtrl.remove not work |
1 similar comment
There's a regression on this ? I have still this issue this.navCtrl.remove not work |
I have the same problem. this.navCtrl.remove not work |
If you provide some step you did to debug the problem, and cc a team member, maybe it will be checked sooner. At least test in which version of ionic the regression happened. (We dont need this right now, so I have no time to check this now.) |
Problem solved #12238 |
I am still facing this issue. Ionic-angular 3.5.3. |
me too. |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Short description of the problem:
The
NavController.remove
function doesnt work as docs states. It cant remove pages in some cases when it should be able to.What behavior are you expecting?
NavController.remove
works as docs states and remove pages from the stack the correct way.Steps to reproduce:
For testing you will have to expose the
NavController
in the last page withconsole.log
. (In the constructor addconsole.log(this.nav)
);We will use this code snippet to list the stack, because no built in options exist for it now at the moment.
temp1.remove(temp1.length() - 2, 2)
Note: This seems not to work only if I try to remove the last 2 page. With the last 1 or 3 it works well. So
temp1.remove(temp1.length() - 1, 1)
andtemp1.remove(temp1.length() - 2, 2)
produces the same result.Which Ionic Version? 2.x
Run
ionic info
from terminal/cmd prompt: (paste output below)The text was updated successfully, but these errors were encountered: