Fixed codacy problems in forms/base/services/socket.io.client.js
This commit is contained in:
parent
e8edee2e2d
commit
35f0290a2f
|
@ -1,14 +1,11 @@
|
||||||
(function () {
|
(function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
// Create the Socket.io wrapper service
|
|
||||||
angular
|
|
||||||
.module('forms')
|
|
||||||
.factory('Socket', Socket);
|
|
||||||
|
|
||||||
Socket.$inject = ['$timeout', '$window'];
|
|
||||||
|
|
||||||
function Socket($timeout, $window) {
|
function Socket($timeout, $window) {
|
||||||
|
|
||||||
|
var service;
|
||||||
|
|
||||||
// Connect to Socket.io server
|
// Connect to Socket.io server
|
||||||
function connect(url) {
|
function connect(url) {
|
||||||
service.socket = io(url, {'transports': ['websocket', 'polling']});
|
service.socket = io(url, {'transports': ['websocket', 'polling']});
|
||||||
|
@ -39,7 +36,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var service = {
|
service = {
|
||||||
connect: connect,
|
connect: connect,
|
||||||
emit: emit,
|
emit: emit,
|
||||||
on: on,
|
on: on,
|
||||||
|
@ -61,4 +58,11 @@
|
||||||
|
|
||||||
return service;
|
return service;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Create the Socket.io wrapper service
|
||||||
|
angular.module('forms')
|
||||||
|
.factory('Socket', Socket);
|
||||||
|
|
||||||
|
Socket.$inject = ['$timeout', '$window'];
|
||||||
|
|
||||||
}());
|
}());
|
||||||
|
|
Loading…
Reference in a new issue