FAQ: Your First App - ng-click I

It relates back to the MainController, $scope.products array which is the scoped object in the ng-repeat loop. $index is the array index of the target object that just received a click. ng-click is an event listener/handler that finds that index so the likes state can be updated.