I’m using framework7 for creating a form using framewok7.It appears that the init event is being fired twice , even though i have only a single view for each route.
It looks like i’m misunderstooding the concepts.It would be helpful if someone may clearify it.Till now, in order to create a new page, i’m following the steps:-
1)First i create route in routes.js
2)next, i would create corresponding page in /pages directory.
3)In order to add events, i would do following in my app.js:-
$$(document).on('page:init','.page[data-name="data-name"]',function(e,page){
//add events here
});
I don’t understand when i would need to create a view? As far as i understood init must run only once, then,why it’s runing twice? Is it runing twice because all routes are in default view?
In my application, i have three routes which are:-
1)/memo_list/
2)’/edit/’
3)’/addtask’
Should i make a single route with all these routes or one view for each route
The solution you provided in not working