corrects published documentation

Yes, the code actually needs to be fixed, but in the mean time, for
those new to this project, this correction will get you running.

See https://github.com/MetinSeylan/Vue-Socket.io/issues/85#issuecomment-328351693
This commit is contained in:
David Vezzani 2018-01-15 08:49:31 -07:00
parent 8951667903
commit e84ac8ce71

View file

@ -35,6 +35,8 @@ Vue.use(VueSocketio, socketio('http://socketserver.com:1923'), store);
#### On Vuejs instance usage
``` js
import Vue from 'vue'
var vm = new Vue({
sockets:{
connect: function(){
@ -47,7 +49,7 @@ var vm = new Vue({
methods: {
clickButton: function(val){
// $socket is socket.io-client instance
this.$socket.emit('emit_method', val);
(new Vue()).$socket.emit('emit_method', val);
}
}
})