I have an array of leads in my component but need to filter out all of the leads where selected is equal to true and store them in a variable.
How would I do this with AngularJS?
This is what I currently have but it is coming back as undefined:
var list = $filter("filter")($scope.leads, {
selected: true
});
Note that some objects have the property: "selected": true and some don't.
Please let me know what (if any) further info you require.
Thanks
$scope.leadshave?trueor"true"values? Boolean and strings are different$filterin to the controller?