title: AngularJS Direcitve - link function doesn't fire
body: <p>What I'm trying to achieve: 
  wrapping cordova native handlers inside an angular directive </p>
  
  <p>I would like to implement handlers for Cordova's native events using a directive wrapper (in order to listen to the body load event).</p>
  
  <p>I have the following directive boilerplate:</p>
  
  <pre><code>angular.module('vitaApp')
    .directive('cordovaNative', function () {
      return {
        restrict: 'A',
        compile: function (element, attrs, transcludeFn) {
            alert('compile fired');
           element.bind('load', function(){
                alert('load occured');
            });
        },
        link: function postLink(scope, element, attrs) {
            alert('link fired');
            element.bind('load', function(){
                alert('load occured');
            });
        }
      };
    });
  </code></pre>
  
  <p>Which is instantiated in the following way:</p>
  
  <pre><code>&lt;body ng-app="vitaApp"  ng-controller="metaCtrl" ng-swipe-right="showMenu()"  ng-swipe-left="hideMenu()" cordova-native&gt;
  </code></pre>
  
  <p>Compile function for cordovaNative directive fires, but the link function doesn't.</p>
  
  <p>Could it have something to do with the ng-swipe directives (e.g. '{terminal: true}')?</p>
  
  <p>Note: I am not trying to use <code>compile</code> and <code>link</code> together, I am trying to demonstrate that non of them works for the purpose of subscribing to the <code>load</code> event separately.</p>