Initialization

Once the app layout and navigation is set up, we will need to initialize the app.

The app initialization code is defined inside /assets/custom/js/init.js file.

Define the app parameters inside:

window.app = new Framework7({

});

For app initialization parameters, visit https://framework7.io/docs/app

If you want to run any functions just after the app has been initialized, call them inside app.on('init', function() { event handler.

After the initialization parameters have been defined, we need to manually call the app initialization method inside index.html file.

In the index.html file, this code is added inside the <script> tag just before the closing </body> tag.

window.onload = function() {
    app.init();
}

Last updated