aboutsummaryrefslogtreecommitdiffstats
path: root/src/ngMobile/directive/ngClick.js
diff options
context:
space:
mode:
authorBraden Shepherdson2013-03-08 09:38:29 -0500
committerIgor Minar2013-04-11 13:01:24 -0700
commit5e0f876c39099adb6a0300c429b8df1f6b544846 (patch)
tree3c5fc1b7b55f466e232e4b3a2c0d81e8bc40313c /src/ngMobile/directive/ngClick.js
parentf24cf4b58f3c2e56df188738356b21e6c898ff0c (diff)
downloadangular.js-5e0f876c39099adb6a0300c429b8df1f6b544846.tar.bz2
feat(ngSwipe): Add ngSwipeRight/Left directives to ngMobile
These directives fire an event handler on a touch-and-drag or click-and-drag to the left or right. Includes unit tests and docs update. Manually tested on Chrome 26, IE8, Android Chrome and iOS Safari.
Diffstat (limited to 'src/ngMobile/directive/ngClick.js')
-rw-r--r--src/ngMobile/directive/ngClick.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ngMobile/directive/ngClick.js b/src/ngMobile/directive/ngClick.js
index a52893b1..b3e3007d 100644
--- a/src/ngMobile/directive/ngClick.js
+++ b/src/ngMobile/directive/ngClick.js
@@ -163,7 +163,7 @@ ngMobile.directive('ngClick', ['$parse', '$timeout', '$rootElement',
// Actual linking function.
return function(scope, element, attr) {
- var expressionFn = $parse(attr.ngClick),
+ var clickHandler = $parse(attr.ngClick),
tapping = false,
tapElement, // Used to blur the element after a tap.
startTime, // Used to check if the tap was held too long.
@@ -221,7 +221,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?
- expressionFn(scope, {$event: event});
+ clickHandler(scope, {$event: event});
});
}
tapping = false;
@@ -236,7 +236,7 @@ ngMobile.directive('ngClick', ['$parse', '$timeout', '$rootElement',
// desktop as well, to allow more portable sites.
element.bind('click', function(event) {
scope.$apply(function() {
- expressionFn(scope, {$event: event});
+ clickHandler(scope, {$event: event});
});
});
};