I'm trying to perform an advanced search with an angular filter. The idea of the filter is to receive two values (maximum and minimum) in an array and copy all intervals that are within the maximum and minimum of another array.
example: array = {20,32,10, 60, 75, 43, 95}
minimum: 50 maximum: 100
resultant vector = {60, 95} 75.
code:
for (var i = 0; i < products.length; i++) {
if (product[i].precio >= $scope.minimo && product[i].precio <= $scope.maximo)
return this.products[i];
}
return null;
};