angular-socket-io
angular-socket-io copied to clipboard
how can i confirm the angular app is successful connected ?
how to confirm the angular app is successful connected to some ip address ? please give some example code. thanks!
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!');