This is part of my program code.
makeQRCode : function() {
var URL = 'http://127.0.0.1:5000';
this.socket = io.connect(URL + '/socket', {'force new connection': true});
console.log(this.myMaker); //print Maker's functions
this.socket.on('connect', function(){
console.log('connect');
console.log(URL); //print 'http://127.0.0.1:5000'
//console.log(this.myMaker); //how can I call myMaker In this function
});
}
Since 'this' in socket.io function indicate 'socket', cannot access class member. How can I access class member in there.