Open a 2nd Modal and then close the 1st modal
See original GitHub issueHi,
@ionic/angular": "4.11.5"
I have a series of Modal items. All are working fine. But the only issue here is how to close the current modal after 2nd modal has been opened.
I have tried this. But then it never opens the 2nd Modal.
This is within the 1st Modal
async next(): Promise<void> { // try to open 2nd Modal and after that close the 1st Modal
await this.showSeeAgainModal();
this.cancel();
}
cancel(): void {
this.modalController.dismiss();
}
async showSeeAgainModal(): Promise<void> { // This is the 2nd Modal
const modal: HTMLIonModalElement = await this.modalController.create({
component: SeeAgainPage,
});
modal.onDidDismiss().then(async (res) => {
});
return await modal.present();
}
I can use simply like so:
But the problem here is it closes the 1st Modal before open the 2nd one. It gives bad UX.
next(): Promise<void> { // this is working fine. But bad UX
this.showSeeAgainModal();
this.cancel();
}
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Bootstrap modal: close current, open new - Stack Overflow
When an user pushes a button inside this modal, I want the current modal to hide, and immediately after that, I want a...
Read more >Bootstrap : Close current and open a new modal window
Bootstrap : Close current and open a new modal window. This is very basic requirement to open second modal window by clicking on...
Read more >Modal over another modal - Material Design for Bootstrap
Hi,. I need your help, I want to display a modal over another one but the overlay(mask/backgraund) don't apply over the first one....
Read more >Modal · Bootstrap v5.0
Modals are built with HTML, CSS, and JavaScript. · Clicking on the modal “backdrop” will automatically close the modal. · Bootstrap only supports...
Read more >If multiple modals, scroll lock fails to clear after closing last ...
While in the first modal, user activates a second modal, which closes the first and opens the second; disableBodyScroll() adds a scroll lock...
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
After I have talked to my client I changed it to a series of pages. i.e. not using series fo Modals. So now I don’t need this feature. Thanks @liamdebeasi
This would be great if ionic team can implement this which will hide first modal behind the scene.