Execute Javascript function oninit in Framework7 on index page - Cordova -


on app start want execute javascript function.

i tried work on index having - data-page="index" , using below function:

myapp.onpageinit('index', function (page) {   // "page" variable contains required information loaded , initialized page  }) 

but function doesn't work when application started.

you have trigger it.

myapp.onpageinit('index', function() {     // code here }).trigger(); 

use .trigger() index route. can read more in framework7 documentation.

update

you can check issue conversation in framework7 github repo.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -