title: Get and Set class of an element in AngularJs
body: <p>I've added the ng-click to my icon like this:</p>
  
  <pre><code>&lt;img src="images/customer_icon.png" class="customer" ng-click="processForm($event)"&gt;
  </code></pre>
  
  <p>And here's the js-file.</p>
  
  <pre><code>   var app = angular.module('myapp', []);
      app.controller('mycontroller', function($scope) {
          $scope.processForm = function(obj) {
              var elem = angular.element(obj);
              alert("Current class value: " + elem.getAttribute("class"));
         };
      });
  </code></pre>
  
  <p>I'm getting the "elem.getAttribute is not a function" error. Trying to switch "class" to "ng-class", i faced another problem: "ng-class" is not recognised by my css files. </p>
  
  <p>Is there any way I can get/set the "class" attribute directly?</p>