Reputation: 129
I have a page in framework 7 loading product categories using ajax. The content is loaded based on a url variable, eg product_categories.html?cat=1. By clicking on a product category the content is loaded onto the same page based on the cat variable. When i try to go back to a product category from a subcategory using the back button, the content that is being loaded is not that of the previous category, but that of the same category i am currently in. Am assuming that the url var is not being refreshed when clicking the back button. Is there a way to solve this? Thanks
Upvotes: 0
Views: 1089
Reputation: 374
The way to fix this would be that instead of making the back button go back to the previous page, make it advance to the previous page. That means that instead of
mainView.router.back();
do
mainView.router.loadPage(/*url*/);
Note that this may mess up your logic elsewhere - if it does, you may need to look into refreshing with one of the following:
mainView.router.refreshPage()
mainView.router.refreshPreviousPage()
Upvotes: 1