Skip to content
This repository was archived by the owner on Jul 30, 2020. It is now read-only.

Commit a40a0e1

Browse files
committed
Merge pull request #11 from skrausler/master
event fix
2 parents f0d2779 + 36d716e commit a40a0e1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/ngTouch.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ angular.module("ngTouch", [])
88
$element.bind("touchstart", onTouchStart);
99
function onTouchStart(event) {
1010
var method = $element.attr("ng-touchstart");
11+
$scope.$event = event;
1112
$scope.$apply(method);
1213
}
1314

@@ -26,6 +27,7 @@ angular.module("ngTouch", [])
2627
}
2728
function onTouchMove(event) {
2829
var method = $element.attr("ng-touchmove");
30+
$scope.$event = event;
2931
$scope.$apply(method);
3032
}
3133
function onTouchEnd(event) {
@@ -44,6 +46,7 @@ angular.module("ngTouch", [])
4446
$element.bind("touchend", onTouchEnd);
4547
function onTouchEnd(event) {
4648
var method = $element.attr("ng-touchend");
49+
$scope.$event = event;
4750
$scope.$apply(method);
4851
}
4952

0 commit comments

Comments
 (0)