From f1b94b4b599ab701bc75b55bbbbb73c5ef329a93 Mon Sep 17 00:00:00 2001 From: Michał Gołębiowski Date: Wed, 19 Jun 2013 20:52:50 +0100 Subject: feat(jqLite): switch bind/unbind to more recent jQuery on/off jQuery switched to a completely new event binding implementation as of 1.7.0, centering around on/off methods instead of previous bind/unbind. This patch makes jqLite match this implementation while still supporting previous bind/unbind methods. --- src/ng/directive/ngEventDirs.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ng/directive/ngEventDirs.js') diff --git a/src/ng/directive/ngEventDirs.js b/src/ng/directive/ngEventDirs.js index 43047ad9..9420f720 100644 --- a/src/ng/directive/ngEventDirs.js +++ b/src/ng/directive/ngEventDirs.js @@ -43,7 +43,7 @@ forEach( ngEventDirectives[directiveName] = ['$parse', function($parse) { return function(scope, element, attr) { var fn = $parse(attr[directiveName]); - element.bind(lowercase(name), function(event) { + element.on(lowercase(name), function(event) { scope.$apply(function() { fn(scope, {$event:event}); }); @@ -265,7 +265,7 @@ forEach( */ var ngSubmitDirective = ngDirective(function(scope, element, attrs) { - element.bind('submit', function() { + element.on('submit', function() { scope.$apply(attrs.ngSubmit); }); }); -- cgit v1.2.3