Sure…
So its based off the ‘tabs’ boiler plate from github…
first I have the app.js ( I can post if you like it very standard, I didn’t change much here )
// Framework7 App main instance
var app = new Framework7({
init: false,
root: '#app', // App root element
id: 'appName', // App bundle ID
name: 'Framework7', // App name
theme: 'auto', // Automatic theme detection
on: {
init: function () {
console.log('App initialized');
createLogin();
},
pageInit: function () {
},
},
This is for the most part it, and this seems to run just fine, I also have a routes js file, again, not sure if you need the full routes file as its just the one that comes from the boiler plate but it looks like this
routes = [
{
path: '/',
url: 'index.html',
},
{
path: '/sessionList/',
url: './pages/sessionList.html',
options: {
animate: true,
},
},
{
name: 'about',
path: '/about/',
url: './pages/about.html',
},
{
path: '/catalog/',
url: './pages/about.html',
},
One elements that is differnt is the route I hadded ‘sessionList’
Now this work, the home view is creates and everything looks good, however when I select on one of my buttons (sessionList) that will route to the sessionList page it loads into the view I’m currently on, basically overwriting the ‘home’ tab. The routing code I’m using is
app.views.main.router.navigate('/sessionList/', {reloadCurrent: false,animate:true});
Now, this works but it hijacks the home tab… I have tried a few things based off the docs and that was to try changing the
router.navigate
to do thing like
homeView.router.navigate
or
app.homeView.router.navigate
Both of the latter do not work and throw and undefined error, however looking at the docs it would appear
router.navigate OR homeView.router.navigate
Should produce something so its a bit unclear what I am doing wrong, ultimately I just need to route to a different page, depending on the page run a specific function on the page init but not overwriting the current view each time
I hope that make sense, again I can go into more detail if needed.
Thanks!