angular-sails-bind
angular-sails-bind copied to clipboard
Error: io.socket is undefined
I am trying to integrate this with my angular project but as soon as I make a call inside a controller I get the following error:
Error: io.socket is undefined
_get@http://localhost:9000/bower_components/angular-sails-bind/angular-sails-bind.js:179:13
I have confirmed that sails.io.js is being included before angular etc etc, any ideas?
I am facing the same issue too. Is there any other js file to be included like sails.io.js etc.
Same issue here too, did you manage to fix it?
Yeah I did, you need to manually include Sails.io.js before loading Angular Sails binds, the plug in does work it just not include the required file.
Yes, sorry for the long delay in answering, I've been really busy at may day-job.
You should include sails.io.js. It gets added by default on sailjs projects. I may need to add that to the readme.
Hi everyone. I think that I've had experienced this issue. Here is how scripts included:
<script src="js/dependencies/sails.io.js"></script>
<!-- build:js(src) scripts/vendor.js -->
<!-- bower:js -->
......
<script src="../bower_components/angular-sails-bind/dist/angular-sails-bind.js"></script>
.......
<script src="../bower_components/angular-socket-io/socket.js"></script>
.......
<!-- endbower -->
<!-- endbuild -->
And here is my code:
/** @ngInject */
function DataRowsController(..., $scope, $sailsBind, ...) {
...
$sailsBind.bind("proxy", $scope);
...
}
If I navigate to some route that not uses sails-bind (so sails.io will connect normally) and then navigate to route that uses it -- it works OK. But if I open app at route that uses sails-bind, it will fail with error: