Closed misterch0c closed 9 years ago
What version of sails.io.js are you using?
But what is happening is sails.io.js doesn't have a .once()
method so angular-sails tries to grab it from the "raw" socket that is exposed through sail.io.js, but it appears that the "raw" socket is not there.
// socket.io-1.2.1 // (from http://socket.io/download/)
Got it from the bower install and it seems to have the .once()
method
sails.io.js is a dependency of angular-sails and must be included. We removed this dependency in the next version which should be released within the next month or so.
While socket-io is in sails.io.js, it is only exposed when a connection is made. It is exposed through the _raw
property. It would appear that the socket was not connected and thus angular-sails was not able to get at the .once()
method when it tried.
Sorry that header was from the header of another sails.io.js ..
"name": "sails.io.js", "main": "dist/sails.io.js", "version": "0.11.4"
So I ran bower update sails.io.js to get 0.11.5 but I'm still facing the same error
Because .once()
is different from on
and off
(its not exposed directly), it is a special case and we should expose it differently.
Ok, there is a new build that has been released that should solve your issue.. The new release is 1.1.1 and you should be able to get it via bower.
Works like a charm now, thank you
I just made a new project using slush. Then bower install angular-sails --save Used your example code and error. See the gist for code and error https://gist.github.com/misterch0c/b30aec433062cdb0c44b