title: Get the scope's element outside the directive
body: <p>Is there a trick to get the element associated with the scope outside the directive that owns it?</p>
  
  <p>I act on the premise that it has to be done in least favorable conditions (from the console or Greasemonkey script). E.g. to get the element that has the scope</p>
  
  <pre><code>angular.element(document.querySelector('.ng-scope')).scope().$$childTail
  </code></pre>
  
  <p>without DOM traversing.</p>
  
  <p>I guess it is possible to traverse all <code>ng-scope</code> and <code>ng-isolate-scope</code> DOM elements and map their scopes, yet I'm looking for more elegant solution (the map also needs to be kept up to date, and I'm trying to stay away from <code>DOMSubtreeModified</code>, also this won't work with <code>debugInfoEnabled</code> disabled).</p>