diff --git a/package.json b/package.json index c229f5a..42d4233 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,8 @@ "grunt-contrib-concat": "~0.3.0", "grunt-contrib-uglify": "~0.4.0", "grunt-contrib-jshint": "~0.9.2", - "grunt-karma": "~0.8.0", + "karma": "^0.13.0", + "grunt-karma": "~0.12.1", "grunt-ng-constant": "~0.4.8", "grunt-newer": "~0.6.1", "jshint-stylish": "~0.1.5", diff --git a/src/socketBackend.js b/src/socketBackend.js index aa3e5fa..2fdf8e5 100644 --- a/src/socketBackend.js +++ b/src/socketBackend.js @@ -55,7 +55,7 @@ function createSailsBackend($browser, $window, $injector, $q, $timeout){ connection.subscribe = function(event,handler){ var callback = tick($window.io.socket,handler); $window.io.socket.on(event,callback); - return angular.bind($window.io.socket, $window.io.socket.removeListener, event, callback); + return angular.bind($window.io.socket, $window.io.socket.off, event, callback); } return connection;