title: Adding class to an element on its click event
body: <p>I am new to Angular Js. I need to add a class to an element on its click event. I tried the following code. But it is not working.</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;style&gt;
          .active{color:red;}
      &lt;/style&gt;
  
      &lt;script src="js/lib/jquery.min.js"&gt;&lt;/script&gt;
      &lt;script src="js/lib/angular.min.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body ng-app="MyApp" ng-controller="MyController"&gt;
  
      &lt;div ng-repeat="data in datas"&gt;
          &lt;p ng-click='selectMe()'&gt;{{data.name}}&lt;/p&gt;
      &lt;/div&gt;
  
      &lt;script&gt;
      var app = angular.module('MyApp',[]);
      app.controller('MyController',function($scope){
           $scope.datas = [{name:"first"},{name:"second"}];
  
           $scope.selectMe = function (){
              $(this).addClass('active');
           }
      });
  
      &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>What is the problem in this code? Is it necessary to use ng-class ? How to do it?</p>