-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v1 or v2? #88
Comments
v2 it pretty different than v1. I use v2, but I really don't use all of the feature it offers. I've asked for feedback and issue reports... and the lack of them may mean it good or that no one is using it. |
I tried using v2 yesterday, and it broke my build, as it doesn't want to use the I was also hoping v2 would have exposed socket.io's |
https://docs.angularjs.org/api/ng/service/$http doesn't seem to have a |
You're right, I realized that a little bit ago, as I was modifying my service. What I was referring to in $http, is using |
2.0 still accepts a url through the provider: angular-sails/src/service/$sails.js Line 47 in c9cd8a3
You also have the ability to create your own socket and pass that to the provider, it will be used instead of creating a new connection. You can use angular-sails/src/service/$sails.js Lines 50 to 52 in c9cd8a3
The thing you are probably running into is that the socket it a constant connection, to a single server. $http would allow you to sent anywhere, $sails limits it to the socket connection. It seems angular-sails may need to have the ability to set up multiple socket connections (maybe a factory service)? But angular-sails is more or less designed to work with sails, which assumes a single socket endpoint.Also, in 2.0, you can get to the socket via $sails._socket._socket . $sails._socket is the sails socket.io wrapper, which itself exposes the underlying socket through ._socket .angular-sails/src/service/$sails.js Line 54 in c9cd8a3
angular-sails/src/service/$sailsIo.js Line 46 in c9cd8a3
angular-sails/src/service/$sailsIo.js Line 36 in c9cd8a3
|
I understand v2 is supposed to accept an URL through the provider (I dug into the code to make sure), just as v1 does, however, that's what forced me to go back to v1: v2 ignores it for some reason, and uses the domain/port it was served from. I had v1 working, found out about v2; updated to v2 (only calling functions on button presses, pressed no buttons); v2 was attempting to connect to As far as And the multiple sockets: I don't think that's necessary. It would just be nice to tell the service to hold off on the connection, until it's kicked off manually down the line. Not a need, just a nice-to-have. Only because supplying the HTML attributes for socket.io is impossible when using something like |
Hi,
We are using currently the v1 for our application. I'm wondering if the V2 version should be used and if it is stable enough. What do you think? Is there a plan to release the final version soon?
The text was updated successfully, but these errors were encountered: