Back did not work as expected!

Hi, I would love to use Framework7.
It took me a day to learn the problem, but there was no workaround

I have 3 page.
Home => Page A => Page B => Page C

In page home Home: i set click link will run:

app.views.main.router.navigate('/page-a/');

In Page A: i set click link will run:

app.views.main.router.navigate('/page-b/');

In Page B: i set click link will run:

app.views.main.router.navigate('/page-c/');

But when i click Back in Page C then framework7 back to Page B but also automatically reload Page A

I do not want automatically reload Page A when click Back in Page C.
I don’t understand why when I press Back in Page C, it automatically reloads Page A…
I need to do something ?
Thanks for project…

Hi,
I have write example in: https://jsfiddle.net/tinamore/v54pbwo0/34/

In PAGE HOME > Go to Page A > Go to Page B > Go to Page C > Then click BACK

Then show popup: REQUEST FOR GET DATA (In the example, simulate the request with setTimeout)

At page A I have retrieved data, I want click Back in page C then ONLY return back to page B (Not need retrieve data at page A again)

It is normal behavior. To disable:
preloadPreviousPage: false,
SwipeBack: false

3 Likes

Thanks for support.

I try to find out again, in the topic

https://forum.framework7.io/t/app-router-back-go-back-a-certain-amount-of-levels-back/5078

I set:

stackPages: true

Has worked very well

I will try your way.

@shastox I have the same behavior, Where to put these options? on the route ou the view?

With my solution, i added to option app. It works well.
I also don’t understand why framework7 doesn’t set this option the default.

var app = new Framework7({
...
,
view: {
 stackPages: true
}
...
}
2 Likes

thanks @tinamore, I will try this.

I am using cordova , the back click took many time to fire. Do you have the same behavior?

@Idriss_Laouali : no, Framework7 runs smoothly, back click is fine.