Call a method function inside a method function

I am trying to call a method function inside a method function and not working at all…
any tips?

the function logInNetwork call the network to login and then call the function log to pass the obj to the function log…

my code:

methods: {


log: function (name, obj) {
self.$app.dialog.alert(name);
},

  logInNetwork: function (network) {
    var self = this;
    //self.$app.dialog.alert(network);
      hello( network ).login(function(e){
        log("login",e);
      });
  },

I have also added the function log into the pageInit and does not work either

code:

  pageInit: function(e, page) {


function log(name,obj) {
console.log(‘log’);
};

any ideas why is not working… method log not being called…
thanks

All data and method defined in components will be available on its instance. So you need to call it as self.log() in other method

2 Likes

Oops! I think I forgot to try self.log() … my fault …
big thanks…