I am trying to remove previous pages from history in some specific cases!
to explain!
I am at the home page and I want to go to check if I have saved some favourites in my favourites page, in that favourites pages I found I have 3 saved favourites and I want to check which ones are, so I check the details by clicking details and I go to a third page.
- page home
- page saved favourites
- page saved favourites details
home -> list of 3 favourites saved -> open details of the 3 saved favourites saved
when I am in the third page I want to be able to return home or go to another page…
if I return home I am using this code below to return back in history to home page:
var view = app.views.current;
view.router.back(view.history[0], {
force: true
});
but if from favourites I go to another page using:
app.router.navigate("/hotel-list/", {
context: {},
force: false,
ignoreCache: true
});
then when I go back from this new page “hotel list” page I return to favourites again and I need to return to the page previously to favourites so I need to remove the history pages of favourites in between…
this means I will back to home again not to favourites…
is that possible to clear some previous pages from the history in the view?
thanks