1

my first question here.

I'm building my first mobile hybrid app using ionic and angular. I've got plenty of problems, and here is one of them.

It will be some kind of a quiz game so I want to block backbutton on few screens (tasks and summary). There will be no 'back icon' so the physical android button will be the only way to return to the previous screen.

Tried to firgure it out with these:

http://forum.ionicframework.com/t/is-there-a-way-to-clear-out-the-nav-router-history-and-prevent-a-back-button/356/4

http://www.technicaladvices.com/2013/01/24/overriding-android-back-button-behavior-in-apache-cordova/

How do I disable Android Back button on one page and change to exit button on every other page

but it didn't work.

So I found something about state/location things:

https://stackoverflow.com/a/24701082/3895851

and it seems working (on desktop Chrome and emulator).

I worried about the situation, when clicking on 'back button' on android for many times will quit the app, but it didn't happen.

so here's the question - i will try to rewrite this using angular functionalities, but is it a good (for a newbie) solution to mobile hybrid app or the will be many uexpected bugs in the future because of that?

Community
  • 1
  • 1
xkxd
  • 62
  • 7

0 Answers0