ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

ionic2 nav controller bug when used in popover - .push(somePage) does work, .pop() does throws error

Open florianbepunkt opened this issue 10 years ago • 3 comments

The issue described here still exists: https://github.com/driftyco/ionic/issues/8218

My system info:

Cordova CLI: 6.4.0 
Ionic Framework Version: 2.0.0-rc.2
Ionic CLI Version: 2.1.7
Ionic App Lib Version: 2.1.4
Ionic App Scripts Version: 0.0.42
ios-deploy version: 1.9.0 
ios-sim version: 5.0.8 
OS: OS X El Capitan
Node Version: v6.8.0
Xcode version: Xcode 8.1 Build version 8B62

If I open a popover 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.

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

It throws an error 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

But I can use .push() in the same context, for example

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

does work.

florianbepunkt avatar Nov 13 '16 14:11 florianbepunkt

System info

Cordova CLI: 6.4.0
Gulp version:  CLI version 1.2.2
Gulp local:   Local version 3.9.1
Ionic Framework Version: 2.0.0-rc.2
Ionic CLI Version: 2.1.4
Ionic App Lib Version: 2.1.2
Ionic App Scripts Version: 0.0.39
OS:
Node Version: v7.1.0

The same thing is happen to me!

claudioscheer avatar Nov 18 '16 11:11 claudioscheer

Same thing. It seems to be caused by enteringView and leavingView both being empty here: https://github.com/driftyco/ionic/blob/5ff7072242bb36cf51a0862384be635c04bf1658/src/navigation/nav-controller-base.ts#L429

lightheaded avatar Nov 27 '16 21:11 lightheaded

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[bot] avatar Sep 04 '18 00:09 ionitron-bot[bot]