This is the html code for the buttons, taskfilter is the filter of how the buttons work on click and the class name is 'sel'
<a class="clear-completed" ng-click="taskfilter = 1" ng-class="{'sel':enabled}">
<span>show completed</span>.
</a>
<a class="clear-completed" ng-click="taskfilter = 2" ng-class="{'sel':enabled}">
<span>show to do</span>.
</a>
<a class="clear-completed" ng-click="taskfilter = 0" ng-class="{'sel':enabled}">
<span>show all</span>.
</a>
This is the code I used to add the class scope with the button on click removed the index in html because it wont work
$scope.taskfilters = 0;
$scope.taskfilter = function(index) {
$scope.taskfilters = index;
};