Hello
I need to set the url of the initial view on creating the view:
if (data.member_permission == null || data.member_permission < 2) {
startUrl = '/login/';
} else {
startUrl = '/home/';
}
//init view
mainView = app.views.create('.view-main', {
url: startUrl
});
But if I have declared view parameters before, it is not working:
var app = new Framework7({
id: 'io.framework7.testapp',
el: '#app',
theme: theme,
cache: false,
autoDarkTheme: true,
view: {
name: 'main',
xhrCache: false,
browserHistory: true,
browserHistoryRoot: "/homework/f7/",
},
It seems to be the “browserHistory: true” that causes the problem. With this parameter the view is not created: nothing is loaded. When I uncomment “browserHistory: true”, the view is loaded correctly. (But I think xhrCache:false is ignored…)
Can you help me?
Thank you!
Leo