Hi Sander,

Thanks for the reply. This looked promising. I tried incorporating your 
code into my existing app to see if I could at least get a single gesture 
to register, but I'm not getting any result from the resulting directive. 
The funny this is the gestures do work in the app when attached through 
normal jQuery event listeners.

On Wednesday, August 6, 2014 12:30:24 AM UTC-7, Sander Elias wrote:
>
> Hi Chocola…,
>
> do something like this:
>
>     app.directive('se-singletap', ['$parse',
>         function($parse) {
>             return {
>                 restrict: 'A',
>                 compile: function ($element, attr) {
>                     var fn = $parse(attr['se-singletap']);
>                     return function ngEventHandler(scope, element) {
>                         element.on('singletap', function (event) {
>                             scope.$apply(function () {
>                                 fn(scope, {$event: event});
>                             });
>                         });
>                     };
>                 }
>             };
>         }
>     ]);
>
> That is exactly the same thing as what the angular source code does. You 
> can create those directives from an array, similar to what the source code 
> does.
>
> Regards
> Sander 
> ​
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to