title: getAttribute value with AngularJS
body: <p>I have the following controller... I'm trying to get the <code>name</code> and <code>rating</code> attibute from an HTML input, but I get the error <code>TypeError: angular.element(...).getAttribute is not a function</code></p>
  
  <pre><code>app.controller('courseReview', function ($scope, $http) {
  
    $scope.rateThis = function rateThis(el){
      var elName = angular.element(el).getAttribute('name');
      var rating = angular.element(el).getAttribute('rating');
      document.getElementById(elName+'Rating').value = rating;
    }
  });
  </code></pre>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;div ng-controller="courseReview"&gt;
    &lt;!-- radio input --&gt;
    &lt;input class="star-5" id="wstar-5" rating="5" type="radio" name="welcome" ng-click="rateThis(this)"/&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Is there another way to do this?</p>