ionViewCanLeave and Back button


#1

The examples show catching the error from the promise returned by a push to the NavController.

But how do you catch the error ionViewCanLeave throws when using the built in back button since you’re not calling pop in your code?


#2

Nevermind. I see that “the catch is already taken care of for you by the framework” is mentioned at the bottom of the second, ionViewCanEnter example (this makes more sense to be by the ionViewCanLeave, no?).

I assumed I’d be putting my logic in the catch to alert the user, but I guess it goes in the ionViewCanLeave method.