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

ionic2 - bug?(popover) - navigation from popover. #8218

Closed
zakton5 opened this issue Sep 26, 2016 · 6 comments
Closed

ionic2 - bug?(popover) - navigation from popover. #8218

zakton5 opened this issue Sep 26, 2016 · 6 comments

Comments

@zakton5
Copy link
Contributor

zakton5 commented Sep 26, 2016

Short description of the problem:

This is kind of a question, but could also be a bug/enhancement. If I open a popover, say on a details page, it has options to Edit or Delete the item. When I delete the item, I want to pop the detail page off of the stack. However, this does not work from within the popover. Instead, I have to use Events or pass callbacks.

On the other hand, I am able to push a page onto the navstack, but only in a very certain way.

So, is there, or could there be, any way to accomplish this, or do I have to keep using Events, which I respond to on the detail page itself?

@ekhmoi
Copy link

ekhmoi commented Sep 26, 2016

dont you mind to share your code showing the problem ?

@zakton5
Copy link
Contributor Author

zakton5 commented Sep 26, 2016

Sure, there isn't much to it. Within a popover component:

this.viewCtrl.dismiss().then(() => {
    this.navCtrl.pop();
});

This code successfully dismisses the popover, but does not navigate back. However, the following code sucessfully navigates forward:

this.viewCtrl.dismiss().then(() => {
    this.navCtrl.push(Page);
});

@jgw96
Copy link
Contributor

jgw96 commented Sep 28, 2016

Hello @zakton5 thanks for opening an issue with us! This has been fixed in the rc.0 release. Thanks for using Ionic!

@jgw96 jgw96 closed this as completed Sep 28, 2016
@florianbepunkt
Copy link

florianbepunkt commented Nov 13, 2016

This issues has not been fixed:

this.viewCtrl.dismiss().then(() => {
    this.navCtrl.pop();
});

Still does not navigate back, it only dismisses the popover. I have exactly same situation as @ekhmoi described

Instead of navigating back it throws an errror message

polyfills.js:3 Unhandled Promise rejection: Cannot read property 'getTransitionName' of null ; Zone: angular ; Task: Promise.then ; Value: TypeError: Cannot read property 'getTransitionName' of null(…) TypeError: Cannot read property 'getTransitionName' of null

@ghost
Copy link

ghost commented Apr 4, 2018

Hi there, might be way too late but i figured this out by using the App import on my popover page.

import { App } from 'ionic-angular';

constructor(public appCtrl: App) {}

this.appCtrl.getRootNav().pop();

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 1, 2018

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.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 1, 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

5 participants