code: function gestureDirective(directiveName) {
    return ['$ionicGesture', '$parse', function($ionicGesture, $parse) {
      var eventType = directiveName.substr(2).toLowerCase();
  
      return function(scope, element, attr) {
        var fn = $parse( attr[directiveName] );
  
        var listener = function(ev) {
          scope.$apply(function() {
            fn(scope, {
              $event: ev
            });
          });
        };
  
        var gesture = $ionicGesture.on(eventType, listener, element);
  
        scope.$on('$destroy', function() {
          $ionicGesture.off(gesture, eventType, listener);
        });
      };
    }];
  }
docs: @ngdoc directive
  @name onSwipeDown
  @module ionic
  @restrict A
  
  @description
  Called when a moving touch has a high velocity moving down.
  
  @usage
  ```html
  <button on-swipe-down="onSwipeDown()" class="button">Test</button>
  ```
   
  @ngdoc directive
  @name onSwipeLeft
  @module ionic
  @restrict A
  
  @description
  Called when a moving touch has a high velocity moving to the left.
  
  @usage
  ```html
  <button on-swipe-left="onSwipeLeft()" class="button">Test</button>
  ```