title: Displaying Json Data from ng-repeat in multiple containers
body: <p>Hey I have a question about using ng-repeats. I'm trying to display user data from a large json file in two separate containers. When a user clicks on a row it displays the other piece of the ng-repeat in a different section. If someone could take a look at this fiddle and maybe give me a direction to go in that would be awesome. Thanks!</p>
  
  <p>I'm also using ngTable for the table params, but I don't think that has much to do with the issue.</p>
  
  <p><a href="http://jsfiddle.net/cL5aE/1/" rel="nofollow">http://jsfiddle.net/cL5aE/1/</a></p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;body&gt;
    &lt;div ng-controller="myController"&gt;
      &lt;div class="col-md-6"&gt;
          &lt;table&gt;
              &lt;tr ng-repeat="user in $data" ng-click="loadDetails()"&gt;
                  &lt;td&gt;{{user.name}}&lt;/td&gt;
                  &lt;td&gt;{{user.id}}&lt;/td&gt;
              &lt;/tr&gt;
          &lt;/table&gt;
      &lt;/div&gt;
      &lt;div class="col-md-6"&gt;
          &lt;tr ng-repeat="user in $data" ng-show="loadDetails()"&gt;
              &lt;td&gt;{{user.foo}}&lt;/td&gt;
              &lt;td&gt;{{user.bar}}&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>Controller:</p>
  
  <pre><code>angular.module('app', ['ngTable']);
  
  
  app.controller('myController', function ($scope, $http, ngTableParams) {
  
  $http.get('http://myjson.com/data.json')
      .success(function (data, status) {
  
      $scope.tableParams = new ngTableParams({
          page: 1, // show first page
          count: 10, // count per page
          sorting: {
              CompleteDate: 'asc' // initial sorting
          }
      }, {
          total: data.length, // length of data
          getData: function ($defer, params) {
              // use build-in angular filter
              var orderedData = params.sorting() ? $filter('orderBy')(data, params.orderBy()) : data;
  
              $defer.resolve(orderedData.slice((params.page() - 1) * params.count(), params.page() * params.count()));
          }
  
      });
  
  });
  
    $scope.loadDetails = function(data) {
      //???
    }
  
  
  });
  </code></pre>