You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
angular
.module('app')
.controller('Controller', Controller);
Controller.$inject = ['socket', 'SOCKET_EVENT'];
function Controller(socket, SOCKET_EVENT) {
var vm = this;
socket.emit(SOCKET_EVENT.REQ_OTHER_DATA);
}
The problem is that when I refresh the view where this controller is located, controller fires socket.emit before join event. So how to wait join event's result in controller?
The text was updated successfully, but these errors were encountered:
ghost
changed the title
Wait until socket
Wait 'join' event to emit in controller
Nov 28, 2015
I built socket factory and injected it to one of my controllers.
Controller:
The problem is that when I refresh the view where this controller is located, controller fires socket.emit before join event. So how to wait join event's result in controller?
The text was updated successfully, but these errors were encountered: