title: AngularJs toggle ng-class ng-click
body: <p>Can anyone offer the correct approach to this JSFiddle:</p>
  
  <pre><code>&lt;style&gt;
   .red #btn{
       background-color:red;
    }
  
   .blue #btn{
      background-color:blue;
    }
   &lt;/style&gt;
  
   &lt;body ng-app="ap" ng-controller="con"&gt;
      &lt;button id="btn" ng-click="changeClass()"&gt;Change Class&lt;/button&gt;    
   &lt;/body&gt;
  
   &lt;script&gt;
    var app = angular.module("ap",[]);
  
    app.controller("con",function($scope){
  
    $scope.class = "red";
  
    $scope.changeClass = function(){
       if ($scope.class === "red #btn")
           $scope.class = "blue #btn";
        else
           $scope.class = "red #btn";
     };
   });
  
   &lt;/script&gt;
  </code></pre>
  
  <p><strong><a href="http://jsfiddle.net/baa2G/2/" rel="noreferrer">JsFiddle Link</a></strong></p>
  
  <p>I am trying to change the class of an element via .class &amp; #ID.</p>
  
  <p>Thanks in advance</p>
  
  <p><strong>Thanks tymeJV, new JSFiddle:</strong></p>
  
  <p><a href="http://jsfiddle.net/baa2G/2/" rel="noreferrer">Solution</a></p>