4

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!

2 Answers 2

4

:)

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

Sign up to request clarification or add additional context in comments.

Comments

4

I have the same requirement, so I modified angular-slider by adding custom-ceiling and custom-floor.

By specifying these 2 extra attributes, the slider will start and end based on bindable values and not on the specified floor and ceiling.

Plunker here: http://plnkr.co/edit/hNg2gOTHa7ig2hPsrmZ8?p=preview

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.