Easy
Given the following filter:
app
.filter('customFilter', function () {
var out;
return function (list) {
out = [];
angular.forEach(list, function (item) {
if(item.data > 100) {
out.push(item);
}
});
};
});
And given:
$scope.list = [{
name : 'a',
data : 110,
processed: false
}, {
name : 'b',
data : 99,
processed: true
}, {
name : 'c',
data : 200,
processed: true
}];
what will be the result of
<span ng-repeat="item in list | customFilter | filter: {'processed': true'}">{{item.name}}</span>
Author: Mathieu RobinStatus: PublishedQuestion passed 73 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!
Similar QuestionsMore questions about AngularJS
1
Add an entry to the browser history1
What is the output of the following code?
```
var g = $q.defer();
var f = $q.defer();
setTimeout(function(){
g.resolve(1);
}, 1000);
setTimeout(function(){
f.resolve(2);
}, 2000);
console.log(g.then(function(x){
return f.then(function(y){
return x + y;
});
}));
```0
What are the 5 main building blocks of AngularJS?0
What is the name of the directive that binds the value of an input element to a model in AngularJS?0
Add features and data to the $scope