registerBackButtonAction - possible to let lower prioritized handlers do their work?


#1

I’ve used registerBackButtonAction now for the first time:

Only in special cases (when user switched internal (=non-ui-router) states of the current view, the Android back-button should not execute default action (go back to previous view).

But there’s a problem: once registered (priority IONIC_BACK_PRIORITY.view + 1) it is the only handler which will be called.

Would be nice to have something like “event.backButtonHandled = false” and let ionic call lower prioritized handlers, in this case IONIC_BACK_PRIORITY.view.

Otherwise I have to handle “back” on my own, with potential divergence of the behaviour.


#2

that would be nice… but you are free to call $ionicHistory.back() in all other cases… nothing more is done by ionic if android hardware-backbutton is called.


#3

It’s not the same calling $ionicHistory.goBack(). In 1.0.1 there is a check which causes the app to exit (see sources).


#4

nice to know ^^ i used the registerBackButton functionality for that, yet.