So I have a simple page I’m working on, I’m loading 3 pages in the intial html and each has it’s own data-name="" parameter. I’m initializing my routes and trying to load one of the pages initially but it just sits on the single page, which is always the last one appearing in the html. If I manually trigger a navigate() it likewise does nothing.
Init code:
var app = new Framework7({
// App root element
root: ‘#app’,
// App Name
name: ‘My App’,
// App id
id: ‘com.myapp.test’,
theme: ‘md’,
// Add default routes
routes: [
{
name: ‘login’,
path: ‘/login/’,
pageName: ‘login’
},
{
name: ‘resetPassword’,
path: ‘/resetPassword/’,
pageName: ‘resetPassword’
},
{
name: ‘setSecurityQuestion’,
path: ‘/setSecurityQuestion/’,
pageName: ‘setSecurityQuestion’
}
],
view: {
pushState: true
},
});
var mainView = app.views.create(’.view-main’, {url: ‘/login/’});
demo url:
http://safetyapp.wpengine.com/