0

I'm working on a solution that implements code from the following Stackoverflow post but I'm not able to access the variable. The code is...

<input ng-model="query">
 <div ng-repeat="item in (filteredItems = (items | orderBy:'order_prop' | filter:query | limitTo:4))">
   {{item}}
 </div>
<button ng-click='getFilteredItems()'>Collect</button>

Then in the controller I have the following:

$scope.getFilteredItems = function(){
   var items = $scope.filteredItems;
}

But in the Angular controller, I can't access the variable $scope.filteredItems, why is that?

Community
  • 1
  • 1
Chase W.
  • 1,343
  • 2
  • 13
  • 25

0 Answers0