title: Unable to reference filtered array in ngRepeat - AngularJS
body: <p>I have an <code>ngRepeat</code> directive that is filtered as:</p>
  
  <pre><code>&lt;li ng-repeat='item in items | filter:searchTerm as filteredItems'&gt;{{item.name}}&lt;/li&gt;
  </code></pre>
  
  <p>I am tring to access the <code>filteredItems</code> in my controller like <code>$scope.filteredItems</code> but I'm getting an undefined. How should I solve this?</p>
  
  <p>I have nested controllers. Is the problem with <code>$scope</code>?</p>
  
  <p>My controllers are something like this in my view:</p>
  
  <pre><code>&lt;div ng-controller='MainController'&gt;
   &lt;div ng-controller='FilterController'&gt;
    &lt;li ng-repeat='item in items | filter:searchTerm as filteredItems'&gt;{{item.name}}&lt;/li&gt;
   &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I'm trying to access <code>$scope.filteredItems</code> in <code>FilterController</code>.</p>