Reputation: 31
Framework7 version: Framework7 3.1.1
I am using component template
I tried solutions but current page is not refresh
Solution 1:
app.on('pageInit', function (page) {
if (page.name === 'single-question') {
var mainView = app.view.create('#single-page');
mainView.router.refreshPage();
}
when I console page name and click to open single-page it returns “null” and then app is not working without refresh.
Solution: 2
router.navigate(router.currentRoute.url, {
reloadCurrent: true,
ignoreCache: true,
});
But I got error: “Uncaught (in promise) ReferenceError: currentRoute is not defined”
I aslo try
Cache:false,
cacheDuration: 0,
template7Pages = false
but still facing same problem.
Upvotes: 0
Views: 3539
Reputation: 3
You can refresh the whole page using this
setTimeout("location.reload(true);",1000);
Upvotes: -1
Reputation: 3560
I think you need to refresh page by this:
self.app.router.navigate(app.views.main.router.url, {reloadCurrent: true});
Upvotes: 2