Before I decided to write this issue here I have spent days browsing the official docs, Framwork7 forum, StackOverflow but I didn’t get the whole idea of how framework7 actually works.
So I am a beginner front-end web developer, I used to integrate JS code easily in my Html files and this simple task seems so damn complicated with framework 7.
I tried to add a JS code directly on the bottom of each page of my project, but the code seems to work only on the index.html. So I tried to add separated JS files and call it from index.html also no luck
I want a simple code to run on every page of my projects and for some reason, it seems like an impossible task.
Is there any other way to implement JS code on each page?
I have tried this method and no luck
// Option 1. Using one 'page:init' handler for all pages
$$(document).on('page:init', function (e) {
// Do something here when page loaded and initialized
})
// Option 2. Using live 'page:init' event handlers for each page
$$(document).on('page:init', '.page[data-name="about"]', function (e) {
// Do something here when page with data-name="about" attribute loaded and initialized
})
I am not even sure where to put the above code, The documentations are not clear
The version in my pc of Framework7 is: 4.0.8
and the console shows nothing
when i build the app and test it in my phone it shows splash screen and then white screen only