[ionic v4] can't dismiss modal from current modal page component
See original GitHub issueBug 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:
- Creating any modal and present with a page component.
- Can’t dismiss this modal from current modal inside.
Expected Behavior I think we need a service to dismiss from modals.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
modalController.dismiss()
-> dismiss modalpopoverController.dismiss()
-> dismiss popoverThanks 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.