I am trying to call a method for the initial page index.html… I need to call a facebook login method onclick at the index.html page… and when I call the method I receive error on the console
Can’t find variable: method_name
is it possible when init the app to call a method ?
thanks
// Init App
var app = new Framework7({
id: 'io.framework7.testapp',
root: '#app',
theme: theme,
view: {
stackPages: true,
},
data: function () {
return {
user: {
firstName: 'John',
lastName: 'Doe',
},
language: "en",
};
},
methods: {
helloWorld: function () {
app.dialog.alert('Hello World!');
},
loginWithFB : function () {
console.log('loginWithFB!');
},
},
on: {
pageInit: function() {
console.log('pageInit');
helloWorld(); // this gives me error Can’t find variable: helloWorld
}
},
in my index.html
this below do nothing!
<button href="#" @click="loginWithFB()" class="button button-big button-round button-fill color-tile">Login With Facebook</button>