title: AngularJS - Find Element with attribute
body: <p>I'm new to AngularJS. I've learned that I can find elements in the DOM using queries like the following:</p>
  
  <pre><code>var e = angular.element(document.querySelector('#id'));
  var e = angular.element(elem.querySelector('.classname'));
  </code></pre>
  
  <p>This is useful for finding elements by ID, or by CSS class name. However, I need to be able to find an element using a different approach. I have an element that looks like the following:</p>
  
  <pre><code>&lt;div my-directive class='myContainer'&gt;...&lt;/div&gt;
  </code></pre>
  
  <p>I can't query on 'myContainer' because of how much its reused. For that reason, I would like to find any element with the attribute 'my-directive'. How do I search the DOM and find any element that makes use of 'my-directive'?</p>