<!DOCTYPE html>
<html>

  <head>
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
    <script src='controllers.js'></script>
    <script src='app.js'></script>
  </head>

  <body ng-app="App" ng-controller="Controller">
  <table>
    <thead>
      <tr><th colspan="2">Title</th></tr>
    </thead>
    <tbody>
      <tr ng-repeat="obj in objectArray">
        <td>{{$index + 1}}</td>
        <td ng-click="onClick(obj)">
          {{obj.name}}
        </td>
      </tr>
    </tbody>
  </table>
</body>

</html>
angular.module('App.controllers', [])
.controller('Controller', function($scope) {
    $scope.objectArray = [
        {'name':'apple'},
        {'name':'orange'},
        {'name':'pear'},
        {'name':'naartjie'}
         ];
    $scope.onClick = function(obj){
        console.log(obj);
    };
});
angular.module('App', ['App.controllers']);