(app.dialog.alert), Does not work on the second page, only on the index.html page, Framework7 Version 3

I can’t call the “dialog” on pages other than index.html!
thank you for your help!

App.js

Page Index.html

Page 02

You need to insert script below html

<script>
return{
on:{
pageInit:function(){
var self = this;
var app = self.$app;
var $ = self.$;
$$('.open-alert').on('click',function(){
// Your function
});
    }
    }
    }
</script>

This may work!!!

further take look at:

It doesn’t seem to work, even copying all the code and replacing the event is not called!

event is not called!