Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .factory('socket',function(socketFactory){
- //for develpoent purpose
- if (!window.cordova) {
- var myIoSocket = io.connect('http://localhost:5000'); //worked
- } else {
- var myIoSocket = io.connect('http://mydomain.com:5000'); //won't work when do ionic run android and test it app
- }
- mySocket = socketFactory({
- ioSocket: myIoSocket
- });
- return mySocket;
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement