I have a checkbox list that I would like to use to filter a list. the checkbox list is hard codes and looks like this:
<input type="checkbox" ng-model="characteristics.nontraditional" ng-true-value="non-tradtional" ng-false-value="">  Non Traditional<br>
<input type="checkbox" ng-model="characteristics.metal" ng-true-value="metal" ng-false-value="">  Metal<br>
<input type="checkbox" ng-model="characteristics.plancha" ng-true-value="plancha" ng-false-value="">  Plancha<br>
<input type="checkbox" ng-model="characteristics.rocket" ng-true-value="rocket" ng-false-value="">  Rocket<br>
<input type="checkbox" ng-model="characteristics.wick" ng-true-value="wick" ng-false-value="">  Wick
I have my ng-repeat looking like this:
<div ng-repeat="stove in stoves | filteredstoves:characteristics">
and my custom filter looking like this:
stovecat.filter('filteredstoves', function() {
return function(stoves, characteristics) {
alert(characteristics)
}
}
}
When I load the page. The alert contains "undefined" which is expected as no checkbox has been selected. When I select one or more checkboxes, the alert contains [Object object], which is fine as an object is now passed into the custom filter. How do I access these values passed into my custom filter so that I can filter the list accordingly? Is there something I'm missing?
Thanks folks!