question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[ionic v4] can't dismiss modal from current modal page component

See original GitHub issue

Bug Report

Ionic Info


Ionic:

   ionic (Ionic CLI)          : 4.0.5 (/usr/local/lib/node_modules/ionic)
   Ionic Framework            : @ionic/angular 4.0.0-beta.2
   @angular-devkit/core       : 0.7.2
   @angular-devkit/schematics : 0.7.2
   @angular/cli               : 6.1.2
   @ionic/ng-toolkit          : 1.0.5
   @ionic/schematics-angular  : 1.0.4

Cordova:

   cordova (Cordova CLI) : 6.5.0
   Cordova Platforms     : not available

System:

   ios-deploy : 1.9.2
   ios-sim    : 6.1.3
   NodeJS     : v8.9.4 (/usr/local/bin/node)
   npm        : 5.6.0
   OS         : macOS High Sierra
   Xcode      : Xcode 9.4.1 Build version 9F2000

Environment:

   ANDROID_HOME : not set

Describe the Bug In v3 of ionic, we can use viewController to dismiss from current modal component.But in v4, there is not viewController in @ionic/angular.

Steps to Reproduce Steps to reproduce the behavior:

  1. Creating any modal and present with a page component.
  2. Can’t dismiss this modal from current modal inside.

Expected Behavior I think we need a service to dismiss from modals.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
peterpeterparkercommented, Aug 13, 2018

modalController.dismiss() -> dismiss modal popoverController.dismiss() -> dismiss popover

0reactions
ionitron-bot[bot]commented, Sep 13, 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problems to close modal Ionic 4
For anyone having issues calling the function itself to close the modal in Ionic 4, instead of calling onclick="dismiss()" , you must call...
Read more >
Ionic 4 Angular - How to self dismiss a modal - Stack Overflow
According to the docs, it looks like the dismiss method has moved to ModalController. So to dismiss a modal, I need to do:...
Read more >
Closing a modal with the back button in Ionic 5 / Angular 9
The solution : · 1. Dismiss the Pop-up when the back button is pressed · 2. Don't go back to the previous page...
Read more >
5 Examples of the new Ionic 6 Bottom Sheet Modal
Get the details on how to use the brand new Ionic Bottom Sheet component in this guest blog post from Simon Grimm.
Read more >
ion-modal: Ionic Mobile App Custom Modal API ... - Heroku
The modal can be dismissed after creation by calling the dismiss() method on the modal controller. The onDidDismiss function can be called to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found