io service ES6 refactoring

This commit is contained in:
tmshv committed 2016-02-22 01:36:49 +03:00
1 parent c7cf73a6d1
commit 7594a14ad6
2 files changed
+6 -8

No files matched your search

+4 -7
View File
@@ -1,15 +1,12 @@
/**
* Created by tmshv on 15/03/15.
*/
export default function (app) {
let socket;
module.exports = function (app) {
var socket;
function init(){
socket = io();
}
app.service("io", function () {
app.service('io', () => {
if (!socket) init();
return socket;
});
};
};