title: How to change the button color using ng-click function?
body: <p>I got the buttons list from resource. It consist of 10 buttons like 
  t1,t2,t3,t4,t5,t6,t7,t8,t9,t10</p>
  
  <p>When I click the on t1 button  first time button color change  to red. Second time I click on same button color change to green.</p>
  
  <p>Please tell me how to do this</p>
  
  <pre><code>&lt;div class="col-sm-2 col-lg-1 col-md-1" ng-repeat="table in tables" style="margin-left:1px"&gt;
  &lt;button type="button" class="btn btn-success" ng-click="getTable(table)"&gt;{{table.tablename}}&lt;/button&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>this is my method</p>
  
  <pre><code> $scope.ng-click=gettable(table){
    //
    }
  </code></pre>