I'm having a bit of a problem here. I'm making a cordova app, which has a navigation menu. If the user navigates like this:
-> page one -> page two -> page one
there will be 2 pages in the history, including an instance of the page one (which is the same the user is seeing right now). If the user goes back, it will be like
| page one | -> page two -> page one
So, if the user pressed back on the page one, he certainly doesn't want to see it again while going out of the app, so I want to remove it from the stack.
Note that i'm not trying to remove the previous page from the history, what I want is to remove all instances of the page I am visiting from the navigation stack.
I hope I explained good enough. How can this be achieved?