I have a index.html file with link to a route page called about.
I need to execute some javascript (get data as JSON from external source) and append as content of the about page.
The about page is a HTML file and is opening correctly
By the Docs of Framework7 I’ve added the attribute data-name=“about” to <div class="page">
(<div class="page" data-name="about">
)
On the index.html file I’ve added <script src="js/my-about.js"></script>
with the following code.
$$(document).on('page:init', '.page[data-name="about"]', function (e) {
// Do something here when page with data-name="about" attribute loaded and initialized
console.log("My About Page");
app.dialog.alert("My About Page");
});
No console.log or alert is produced.
Any Ideas Why?
Thanks
R.C.G.C