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

How to remove a modal from stack, ionic 4

$
0
0

@borconi wrote:

I have the following scenario:

this.screenOrientation.onChange().subscribe(
			async () =>  {
					const modal = await this.modalCtrl.create({component: getSignature});
			modal.onDidDismiss().then(data => {
			aux.screenOrientation.unlock();
			 console.log("Returned data from signature pad: " + data);
			//process data
		    });
				return await modal.present();
			}
		);
	   this.screenOrientation.lock(this.screenOrientation.ORIENTATIONS.LANDSCAPE);

which is all good, works as expected, however, if the user presses the back button on the phone keyboard, or if I call Location.back(); it will take me back to the modal window.

In Ionic 3 I was able to remove the page from the stack easily with push/pop but since navigation totally changed in ionic 4 I’m not sure how I can achieve that.

Thanks for input.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



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