-
-
Save christiannwamba/d0bc7b374191233f18afe9b86791f7c2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.channelName = window.location.pathname.replace(new RegExp('/', 'g'), '-'); | |
var channel = this.pusher.subscribe(this.channelName); | |
channel.bind('new-comment', (comment) => { | |
this.comments.push( | |
{name: comment.name, content: comment.content} | |
) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment