I’m currently using Onsen UI to develop a mobile app.
I need to register a certain method to let it fire when the device back button is pushed.
I tried using setDefaultDeviceBackButtonListener
, a global method of Onsen UI(the use of the method is self-explanatory), on one of upper pages on the pagestack, only to find it only fired when the pagestack contains only the current page.
ons.setDefaultDeviceBackButtonListener(()=>{
//blah blah
})
Is it always the case or can that change? If the latter is the case, how? I’d appreciate your answer.
furikake is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.