Im trying to update an existing app to v2 and I can´t even load the pages from my server in my separate views haha!
It´s a 5 tabbar layout.
So I have this now in my index.html page:
<!-- Your main view/tab, should have "view-main" class. It also has "tab-active" class --> <div id="view-1" class="view tab tab-active"> <div data-name="index-1" class="page no-swipeback"> <div class="navbar"> <div class="navbar-inner notranslate"> <div class="center notranslate">SKOLAPPEN</div> </div> </div> </div> </div> <!-- nyheter view --> <div id="view-2" class="view tab"> <div data-name="index-2" class="page no-swipeback"> <div class="navbar"> <div class="navbar-inner notranslate"> <div class="center notranslate">NYHETER</div> </div> </div> </div> </div> <!-- schema view --> <div id="view-3" class="view tab"> <div data-name="index-3" class="page no-swipeback"> <div class="navbar"> <div class="navbar-inner notranslate"> <div class="center notranslate">SCHEMA</div> </div> </div> </div> </div> <!-- lunch meny view --> <div id="view-4" class="view tab"> <div data-name="index-4" class="page no-swipeback"> <div class="navbar"> <div class="navbar-inner notranslate"> <div class="center notranslate">LUNCH MENY</div> </div> </div> </div> </div> <!-- mer view --> <div id="view-5" class="view view-main tab"> <div data-name="index-5" class="page no-swipeback"> <div class="navbar"> <div class="navbar-inner notranslate"> <div class="center notranslate">MER</div> </div> </div> </div> </div>
And my js file looks like this.
// Initialize your app
// Dom7
var $$ = Dom7;// Init App
var app = new Framework7({
// App root element
root: ‘#app’,
// App Name
name: ‘Skolappen’,
// App id
id: ‘com.myapp.skolappen’,
theme: ‘auto’,
// Add default routes// … other parameters
});// Init/Create views
var view1 = app.views.create(’#view-1’, {
url: ‘https://www.manmade.se/iphone/skolappen/hem.asp’
});var view2 = app.views.create(’#view-2’, {
url: ‘https://www.manmade.se/iphone/skolappen/nyheter.asp’
});var view3 = app.views.create(’#view-3’, {
url: ‘https://www.manmade.se/iphone/skolappen/schema/schema.asp’
});var view4 = app.views.create(’#view-4’, {
url: ‘https://www.manmade.se/iphone/skolappen/lunch/menyiframe.asp’
});var mainView = app.views.create(’.view-main’, {
url: ‘https://www.manmade.se/iphone/skolappen/mer.asp’,
domCache:true
});
So what Im I doing wrong??
Any input really appreciated, thanks! Nikolay
And I get this error with the above.
TypeError: undefined is not an object (evaluating ‘$el[0].f7View = view’)