JSFiddle - React, Tailwind, and code Playground
by vvakame
HTML
<div ng-app>
<div ng-controller="Controller">
<ul>
<li ng-repeat="value in values">
{{$index + 1}}
{{value}}
<button ng-click="action($index)">:)</button>
</li>
</ul>
{{pressed}}
</div>
</div>
JavaScript
function Controller($scope) {
$scope.values = ["a", "b", "c"];
$scope.pressed = "none";
$scope.action = function (index) {
$scope.pressed = index;
};
}