Closed janmichaelyu closed 7 years ago
Hi, I'm receiving
TypeError: Cannot read property 'connect' of undefined at socketFactory (http://localhost:3000/bower_components/angular-socket-io/socket.js:31:44)
by calling: socket.emit('client', newValue);
I have 'btford.socket-io' on my dependencies and added: .factory('socket', function (socketFactory) { var mySocket = socketFactory(); mySocket.forward('server'); return mySocket; });
and on my controller I injected 'socket'
What am I missing?
/facepalm, opened this on the wrong project.
Hi, I'm receiving
TypeError: Cannot read property 'connect' of undefined at socketFactory (http://localhost:3000/bower_components/angular-socket-io/socket.js:31:44)
by calling: socket.emit('client', newValue);
I have 'btford.socket-io' on my dependencies and added: .factory('socket', function (socketFactory) { var mySocket = socketFactory(); mySocket.forward('server'); return mySocket; });
and on my controller I injected 'socket'
What am I missing?