Ionic 3 Prevent app Exit

Asked

Viewed 238 times

1

I made an application using Ionic 3. When this on the main screen and in case the user clicks the back button the application is terminated.

I wanted to put a "Prevent appexit" that checks that the user is on the main screen and does not let hold any event.

1 answer

1

Try:

platform.registerBackButtonAction(() => {
    // ACAO que deseja que seja realizada.
});

Browser other questions tagged

You are not signed in. Login or sign up in order to post.