Closed hcyildirim closed 5 years ago
Oh, I figured it out, it's not working if you assign subscription to a variable.
Not working:
this.myChannel = this.cable.subscriptions.create('MyChannel', {
received(data) {
console.log(data);
},
});
Working:
this.cable.subscriptions.create('MyChannel', {
received(data) {
console.log(data);
},
});
Hi,
I have a channel which I can subscribe, but can't unsubscribe. Cable subscriptions count is always 0, not increasing or decreasing.
MyChannel subscriptions is 1, cable subscriptions is 0 so I think
remove
method not working or I have a problem with my code.