-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using 'this' in channel:'user.' + this.user.id #13
Comments
If the user property has been defined before you return it here it should be fine. |
But I got error like this:
even console.log(vm) get the same error. I think channel: function (vm) { |
oh, I'm sorry, I read through that too quickly while I was at work. but you're right, only strings are currently supported. I'll see if I can whip something up this weekend. My main worry is though, is that the channel gets initialised on the created hook. |
You could join a channel in export default {
// data: ...
mounted: function(){
this.$echo.channel('My.Channel.'+this.me); //... etc.
},
beforeDestroy: function(){
this.$echo.leave('My.Channel.'+this.me)
}
} |
can I do something like this to apply current vue instance scope in channel: 'user.' + this.user.id
The text was updated successfully, but these errors were encountered: