I got the buttons list from resource. It consist of 10 buttons like t1,t2,t3,t4,t5,t6,t7,t8,t9,t10
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.
Please tell me how to do this
<div class="col-sm-2 col-lg-1 col-md-1" ng-repeat="table in tables" style="margin-left:1px">
<button type="button" class="btn btn-success" ng-click="getTable(table)">{{table.tablename}}</button>
</div>
this is my method
$scope.ng-click=gettable(table){
//
}