Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AngularJS Slider with min-price and max-price columns

I have an object which has two attributes. One's named min-acceptable-price, and the other named max-acceptable price. In my index page, I'm using the slider to filter out using these two values, such that the $scope.maxPrice uses the objects' max-acceptable-price to filter and the $scope.minPrice uses the min-acceptable-price to filter.

This is to say that if we select a min-acceptable-price of $10 and a max-acceptable-price of $20, then the search function should check all min-acceptable-prices to see that they are greater than $10 and all max-acceptable-prices to see that they are less than $20.

Is it able to do this using AngularJS slider?(http://prajwalkman.github.io/angular-slider/)

Thanks for your help!

like image 380
rkamun1 Avatar asked Feb 16 '23 12:02

rkamun1


1 Answers

:)

How about using the slider to update an upper and lower price bound on the scope, and then filtering on those bounds: http://plnkr.co/edit/uF31rMbNLzF382GUZYqr?p=preview

like image 102
thebenedict Avatar answered Mar 02 '23 22:03

thebenedict