title: How to pass a variable from view to scope using ngRepeat
body: <p>I'm making a browse page where users can see the top terms for my site's search facets (I'm using ElasticSearch/Tire.) I created an array of objects with a title and arguments in the format I need for search. I want to iterate through the array and display the title and then the results of my search for each facet. At first I tried using a for loop in the controller to iterate through <code>facet_selections</code>, but that didn't seem like the Angular way. So now I'm trying to use ng-repeat for the iteration, but I'm not sure how to pass the arguments from the view to the controller. I read through all the directives, and I don't see a good fit, which makes me think I might be on the wrong path all together. </p>
  
  <p>Here is a simplified controller:</p>
  
  <pre><code>$scope.facet_selections=[{name:"Collection", value: "collection_title", term: "collectionTitle"}, {name:"Series", value: "series_title", term: "seriesTitle"},  {name:"Episode", value: "episode_title", term: "episodeTitle"},];
  
  $scope.frequency=Frequency.query({facet: facet}).then(function(data) {
      $scope.topterms=data.facets[term].terms;
  })
  </code></pre>
  
  <p>And here's the html:</p>
  
  <pre><code>&lt;div class="browse" ng-repeat="object in facet_selections" ng-init="var term={{object.term}}"&gt;
      &lt;h4&gt; {{object.name}} &lt;/h4&gt;
      &lt;ul&gt;
          &lt;li  ng-repeat="term in topterms"&gt; {{term.term}} ({{term.count}})&lt;/li&gt;
      &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>