OnDeviceBackButton properties and setDefaultDeviceBackButtonListener not working
Please the ons.setDefaultDeviceBackButtonListener() method and the individual onDeviceBackButton page property does not work when i click my device back button for the first time, but they respond on subsequent clicks.
Please does anyone know what could be the cause of this?? Really desperate, I’ve been trying to debug this for over 2 hours.
@writeosahon Can you post some of your code?
@munsterlander unfortunately, the app is a commercial product and i’m bound by NDA/confidentiality agreements. Have you or anyone you know experienced this type of behaviour from the onDeviceBackButton property??
Thank you for assisting
@writeosahon I have seen it when programmers code it incorrectly. Usually, the eventListener is invoked at the wrong point in the application. We do not need to see protected code, but creating a codepen that demonstrates your issue or sanitized code is the only way we can assist better. I can confirm 100% that the backButton works as designed in multiple platforms so there will be something within the app that needs to be sorted out.
I am using angular2, and unable to figure out how to use onDeviceBackButton, or ons object.
Can anyone help me post some example?
And I feel like the onsen documentation is not really that well. Sorry.
@abdul Did this help document not work? https://onsen.io/v2/docs/angular2/ons-back-button.html