From 6786f0349b89e7f7af33676bb3a7c838559aed62 Mon Sep 17 00:00:00 2001 From: Christoph Burgdorf Date: Sat, 13 Jul 2013 02:15:09 +0200 Subject: [PATCH] feat(ngMobile): trigger ngClick event on element With this patch, people can bind to the 'ngClick' event in directives so that they can run code on the non native mobile tap/click event which is controlled by the click directive from the ngMobile module. Fixes #3218 --- src/ngMobile/directive/ngClick.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ngMobile/directive/ngClick.js b/src/ngMobile/directive/ngClick.js index 3fa68cb4b75f..906ff9b6becc 100644 --- a/src/ngMobile/directive/ngClick.js +++ b/src/ngMobile/directive/ngClick.js @@ -234,6 +234,7 @@ ngMobile.directive('ngClick', ['$parse', '$timeout', '$rootElement', scope.$apply(function() { // TODO(braden): This is sending the touchend, not a tap or click. Is that kosher? + angular.element(tapElement).triggerHandler('ngClick', event); clickHandler(scope, {$event: event}); }); }