Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70917

How to close modal/Alert on back button in ionic4 (PWA)

$
0
0

@akshay_kanchan wrote:

Hi,
I am new to Ionic 4, I have managed to implement a PWA using ionic 4 with Angular.
I am having a hard time figuring out how to close modals/Alerts/ActionSheets on back-button on browser (Desktop & mobile) when served as a PWA. When I press back when a modal is open, the modal stays open and background page is navigated back.
I have tried workarounds from different forums and posts like

  1. this.platform.backButton.subscribeWithPriority(0, async () => {…

  2. fromEvent(document, ‘backButton’).subscribe(() => {…

but none of then are working for me, please can anyone help me with this, need to go production ASAP.

Currently using : ionic : 4.6.2 Angular: 7.2.2

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70917

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>