Answer the question
In order to leave comments, you need to log in
Why is the on event not firing on the vue component?
in the component I cling to the created hook, it emits normally. The server also accepts all the rules. Only now, when the server itself emits a message, the view does not want to accept it, as if it did not subscribe.
socket is defined globally, outside the vue instance
created: function() {
socket.on('listfromserver',function(e) {
alert('any data');
});
socket.emit('list','get');
},
Answer the question
In order to leave comments, you need to log in
Someone, shoot him...
But seriously, tell me the difference between responsive and adaptive in your view?
In order not to be considered a flood: bootstrap.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question