1

hi i have vuejs2 with pusher and this is my code inside my created methods

console.log(this.orders) // this working good outside channel.bind
var pusher = new Pusher('my pusher key', {
    cluster: 'ap2'
});
var channel = pusher.subscribe('my-channel');
channel.bind('my-event', function(data)
{
    console.log('anything here') // this working good
    console.log(this.orders) // i gat here undefinded
});

now ive tried to change watchers or fire any function in my code i always gat undefinded inside

channel.bind

how can i fix this .. thanks

softya
  • 229
  • 7
  • 22

0 Answers0