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 () {
|
||||
'use strict';
|
||||
|
||||
// Create the Socket.io wrapper service
|
||||
angular
|
||||
.module('forms')
|
||||
.factory('Socket', Socket);
|
||||
|
||||
Socket.$inject = ['$timeout', '$window'];
|
||||
|
||||
function Socket($timeout, $window) {
|
||||
|
||||
var service;
|
||||
|
||||
// Connect to Socket.io server
|
||||
function connect(url) {
|
||||
service.socket = io(url, {'transports': ['websocket', 'polling']});
|
||||
|
@ -39,7 +36,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
var service = {
|
||||
service = {
|
||||
connect: connect,
|
||||
emit: emit,
|
||||
on: on,
|
||||
|
@ -61,4 +58,11 @@
|
|||
|
||||
return service;
|
||||
}
|
||||
|
||||
// Create the Socket.io wrapper service
|
||||
angular.module('forms')
|
||||
.factory('Socket', Socket);
|
||||
|
||||
Socket.$inject = ['$timeout', '$window'];
|
||||
|
||||
}());
|
||||
|
|
Loading…
Reference in a new issue