title: Pass element to Angular directive
body: <p>I have a simple popup directive similar to 
  <a href="https://github.com/angular-ui/bootstrap/blob/master/src/modal/modal.js">https://github.com/angular-ui/bootstrap/blob/master/src/modal/modal.js</a></p>
  
  <p>I need to position my popup close to element that initiated the open. </p>
  
  <p>What is best way to make this? Would capturing the initiator with ng-click="open($event)" and passing to directive work? (here is sample of this element capturing <a href="http://jsfiddle.net/Amnesiac/5z5Qz/3/">http://jsfiddle.net/Amnesiac/5z5Qz/3/</a> )</p>
  
  <pre><code>$scope.open= function (e) {
     var elem = angular.element(e.srcElement);
  }
  </code></pre>
  
  <p>How do I then pass this angular.element(e.srcElement) to directive ? (directive would then do some calculations based on position of that passed dom element and re-position the popup)</p>