I would like to set a class for an element using ng-click. However although ng-click sets the value correctly it can't be picked up on the same element using ng-class:
<button class="button" ng-click="selected=2;" ng-class="{active:selected==2}"> </button>
The above code would change the value for $scope.selected but ng-class can only seem to pick this up if it is set by the ng-click of another element.