Last active
March 13, 2018 13:40
-
-
Save shrekuu/1d0ac923a322f5296a778d3d5c6a9ac9 to your computer and use it in GitHub Desktop.
ionic 2 double press back button to exit app
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@lAndresul Hi, we used tab layout, so we imported this provider in the root tab components. When users enter the root tab pages, I call
registerDoublePressToExitApp('a-page-name')
method, when users leave these pages, I callunregister()
to disable this functionality and give the back button back to ionic. Basically you need to import this provider on pages where you want to do thisdouble press back button to exit app
thing. TheregisterPressToFlipCard()
method was part of our project, you can omit that.