Using version 2.0.0-beta.3 of angular sails, I'd like to set up a custom function whenenever the connection/user socket is reconnected (e.g. after network problems).
But I don't know how to do that and whether it's possible at all.
Inside, angular-sails.js, I was able to run the lines of code below inside the SailsIo.prototype.connect function:
Using version 2.0.0-beta.3 of angular sails, I'd like to set up a custom function whenenever the connection/user socket is reconnected (e.g. after network problems).
But I don't know how to do that and whether it's possible at all.
Inside, angular-sails.js, I was able to run the lines of code below inside the SailsIo.prototype.connect function:
self.on('reconnect', function(attemps) { console.log("Foooo"); });
But of course, that's not where such a function should be put. So, how can I put that into my own code?