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?