title: AngularJS - get element attributes values
body: <p>How do you get an element attribute value?</p>
  
  <p>e.g. 
  HTML element: </p>
  
  <pre><code>&lt;button data-id="345" ng-click="doStuff($element.target)"&gt;Button&lt;/button&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>function doStuff(item){
      angular.element(item)[0].data('id'); // undefined is not a function
  }
  </code></pre>
  
  <p>Any suggestions much appreciated, 
  JSFIDDLE demo here:<a href="http://jsfiddle.net/h3TFy/">http://jsfiddle.net/h3TFy/</a></p>