I have a minor issue on Android with the hardware back button on my app’s initial view while the side menu is open. I can get the side menu to close if you hit the back button while it is open but my app also exists after it closes. Is there a way to prevent this? Here is a snippet of what I’m trying to do that almost works -
.controller('Home', function($scope, $ionicSideMenuDelegate, $ionicPlatform) {
$ionicPlatform.onHardwareBackButton(function() {
if ($ionicSideMenuDelegate.isOpenLeft()) {
$ionicSideMenuDelegate.toggleLeft();
}
});
});
I have tried return false
and preventDefault()
in the back button event… no luck though, my app still exits after the side menu closes :~(
Thank you for all the amazing work on Ionic.