Say I have a (extremely simplified) controller defined like so:
app.controller('myController', ['$scope', function(scope){
list=[1,2,3,4,5]
scope.filterFunction = function(item, upperBound){
if(item < upperBound){
return(item);
}
}
}]);
How could I pass a value for upperBound through the template?
<div ng-repeat="item in list | filter:filterFunction">{{item}}</div>
I know that if you roll a dedicated filter, you can parameterize with
`filterName:arg1:arg2....`
Is there any way to achieve a similiar behaviour with this approach? Or
alternately, is there any way to let the controller function have access to
scope?
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.