Skip to content

Instantly share code, notes, and snippets.

@scottmas
scottmas / ngTap.js
Created December 18, 2013 20:01 — forked from mhuneke/ngTap.js
app.directive("ngTap", ["$parse", function($parse) {
return function($scope, $element, $attributes) {
var tapped;
tapped = false;
$element.bind("click", function(event) {
if (!tapped) {
var fn = $parse($attributes["ngTap"]);
$scope.$apply(function() {
fn($scope, {$event:event});
});