Hello,
I am trying to navigate to a specific page from root of my script.
var app = new Framework7({
root: '#app',
routes: [{
path: '/',
url: './index.html',
}]
// here in some page I run **something()** function
});
var mainView = app.views.create('.view-main', {
url: '/',
pushState: true,
});
function something(){
$.ajax({
url: url,
success: function() {
app.router.navigate('/products/');
app.views.main.router.navigate('/products/');
self.app.router.navigate('/products/', {reloadCurrent: true});
// tried with all of this, none works
// this works but inside of routes - page.router.navigate('/link/');
}
});
}
returns this error Framework7: it is not allowed to use router methods on global app router. Use router methods only on related View, e.g. app.views.main.router.navigate(…) or Cannot read property ‘router’ of undefined
I just updated from v2 to latest version 4.4.7