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

What is the best way to handle hardware back button in an angular app?

$
0
0

@harikvpy wrote:

I’m referring to handling the back button from a feature’s root page. In Ionic V3 one could rely on the framework to handle this as the app would navigate the feature root page through the NavController.setRoot, which would not allow back navigation as the navigation stack is empty.

What is the best way to accomplish this Ionic V4 - angular?

Currently, I’m using the canDeactivate router guard coupled with router NavigationStart event to achieve this. Is this the only way? While this works, it’s a little tedious and not as easy as the NavController.setRoot.

Is there another way?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71194

Trending Articles



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