JSFiddle - React, Tailwind, and code Playground
HTML
<div ng-app="myapp">
<div ng-controller="ctrlParent">
<ul>
<a ng-repeat="i in getNumber() track by $index" class="button button-clear" ng-class="{ 'energized': rate == $index+1 }" ng-click="setRate($index+1)">{{$index+1}}</a>
</ul>
</div>
</div>
JavaScript
var app = angular.module('myapp',[]);
app.controller('ctrlParent',function($scope){
$scope.getNumber = function() {
return new Array(5);
};
$scope.setRate = function (value) {
$scope.rate = value;
};
});