Hi,
I have shared my app init and then page init code with version 4 it was working like charm but i don’t understand why pageInit is not getting fired in version 5.1.0 any suggestions what am I doing wrong over here?
My both code is in same file app.js
// Init App
var app = new Framework7({
id: "com.xyz.xyz",
root: "#app",
name: "xyz",
theme: theme,
dialog: {
title: "xyz"
},
routes: routes,
popup: {
closeOnEscape: true
},
sheet: {
closeOnEscape: true
},
popover: {
closeOnEscape: true
},
actions: {
closeOnEscape: true
}
});
app.on("pageInit", function(page) {
console.log(page);
if (page.name === "home") {
console.log("home init");
var homeSwiper = app.swiper.create(".primary-swiper", {
speed: 400,
autoplay: {
delay: 3000,
disableOnInteraction: false
},
on: {
init: function() {
console.log("swiper initialized");
}
}
});
homeSwiper.init();
}
});