angular ng-click toggle class

JavaScript
$scope.toggle = false;


<button id="btn" ng-click="toggle = !toggle" ng-class="{'red' : toggle}">Change Class</button>
Source

Also in JavaScript: