btford / angular-socket-io

Socket.IO component for AngularJS
1.51k stars 233 forks source link

io is not defined #127

Open adaptivedev opened 8 years ago

adaptivedev commented 8 years ago

There was a suggestion here: https://github.com/btford/angular-socket-io/issues/77

This didn't fix my problem with this same error.

.factory('seatStatusSocket',function(socketFactory){ var myIoSocket = io.connect(porturl); // io is not defined here, suddenly.

azachar commented 8 years ago

The solution is described here: http://stackoverflow.com/questions/33411413/angular-socket-io-io-is-not-defined

Diegow3b commented 8 years ago

Worked for me when i changed io('local...) to io.connect('local...) and declare the io "declare var io"

AzRu commented 7 years ago

Happening for me now too. Was also working before.

I have socket.io client library added (1.4.8), I've done what's in the above stackoverflow solution, using the io.connect approach