Skip to content
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

how can i confirm the angular app is successful connected ? #146

Open
ghost opened this issue Aug 11, 2016 · 1 comment
Open

how can i confirm the angular app is successful connected ? #146

ghost opened this issue Aug 11, 2016 · 1 comment

Comments

@ghost
Copy link

ghost commented Aug 11, 2016

how to confirm the angular app is successful connected to some ip address ? please give some example code. thanks!

@AzRu
Copy link

AzRu commented Aug 16, 2016

if you log the socket object, it has 'disconnected' and 'connected' fields

so how about something like

var socket = io.connect(YOUR_URL);
if (socket.connected) console.log('connected!');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant