mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-23 11:37:38 +08:00
fix(events): fixing IE specific issues
IE doesn't have Array#indexOf and [].splice.call doesn't work there either.
This commit is contained in:
@@ -569,10 +569,11 @@ Scope.prototype = {
|
||||
* @param {function} listener Function to remove.
|
||||
*/
|
||||
$removeListener: function(name, listener) {
|
||||
var namedListeners = this.$$listeners[name];
|
||||
var i;
|
||||
var namedListeners = this.$$listeners[name],
|
||||
i;
|
||||
|
||||
if (namedListeners) {
|
||||
i = namedListeners.indexOf(listener);
|
||||
i = indexOf(namedListeners, listener);
|
||||
namedListeners.splice(i, 1);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user