diff --git a/src/ng/rootScope.js b/src/ng/rootScope.js index 5754ad32c3f7..de4b7407be12 100644 --- a/src/ng/rootScope.js +++ b/src/ng/rootScope.js @@ -638,7 +638,7 @@ function $RootScopeProvider(){ namedListeners.push(listener); return function() { - arrayRemove(namedListeners, listener); + namedListeners[indexOf(namedListeners, listener)] = null; }; }, @@ -686,6 +686,14 @@ function $RootScopeProvider(){ namedListeners = scope.$$listeners[name] || empty; event.currentScope = scope; for (i=0, length=namedListeners.length; i