Hello!
I have the problem with deviceready and backbutton on cordova implement.
This is my code:
export default {
mounted() {
document.addEventListener("deviceready", this.onDeviceReady, false);
},
methods: {
onDeviceReady() {
document.addEventListener("backbutton", this.onBackKeyDown, false);
},
onBackKeyDown(e) {
e.preventDefault();
this.$f7router.back();
}
}
}
This code upload every time when I change route page. This ^ code doesn’t work, but when I change first code I see console.log
export default {
mounted() {
document.addEventListener("deviceready", console.log('ready'), false);
},
}
Why this version V4 framework7 I have problem with this implement. On V2 version everything correct work.
From what I noticed problem with scope methods (vue) or function is vanilla JS.
Please help me! Patryk