Skip to content
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

Ionic 2 beta 11 navigation not working #7625

Closed
ferminmoli opened this issue Aug 9, 2016 · 4 comments
Closed

Ionic 2 beta 11 navigation not working #7625

ferminmoli opened this issue Aug 9, 2016 · 4 comments

Comments

@ferminmoli
Copy link

Short description of the problem:

NavController is not working properly

What behavior are you expecting?

NavController redirects to a blank page after doing this.nav.popToRoot() or this.nav.setRoot()

Steps to reproduce:

  1. Set some page as a root one
  2. Navigate between diferent pages
  3. On some action call this.nav.popToRoot() or this.nav.setRoot()
import {NavController} from 'ionic-angular';

@Component({
  templateUrl: 'some-component.html',
})
export class SomeComponent {
 constructor(private nav: NavController) {
  }

 someAction(){
    this.nav.setRoot(LoginComponent);
  }
 otherSomeAction(){
   this.nav.popToRoot();
  }
}

Which Ionic Version? 2.0.0-beta.11

@jgw96
Copy link
Contributor

jgw96 commented Aug 9, 2016

Hello! Thanks for opening an issue with us! Would you mind taking a look at this repo i made and giving it a try? Just click on the push new page button and it will cycle through pushing two pages and then popping to root. Unfortunately, I cannot seem to reproduce with this example. Also, our current sidemenu starter uses setRoot and i can not currently reproduce the issue their either. If you wouldnt mind, could you make a repo with a minimal example i can use to reproduce this issue? Thanks for using Ionic!

@jgw96 jgw96 closed this as completed Aug 9, 2016
@jgw96 jgw96 reopened this Aug 9, 2016
@jgw96
Copy link
Contributor

jgw96 commented Aug 9, 2016

Hello, after further review I am going to close this issue as a duplicate of #7564. Thanks!

@jgw96 jgw96 closed this as completed Aug 9, 2016
@ferminmoli
Copy link
Author

ferminmoli commented Aug 9, 2016

Hi, we could reproduce the issue. It appers when you add LoadingController and an Ajax call.

You can download the code from here: https://github.com/ferminmoli/Ionic-popToRoot

@nachofregeiro
Copy link

It looks like the LoadingController is overriding the app nav, and it's loosing the navigation stack.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants