AngularJS Slider with minimum prices and maximum price columns

I have an object that has two attributes. One of them is called the minimum acceptable price, and the other - the least acceptable price. On my index page, I use a slider for filtering using these two values, so $ scope.maxPrice uses the maximum acceptable price for objects to filter and $ scope.minPrice uses the minimum acceptable price for filtering.

This means that if we choose a minimum reasonable price of $ 10 and a maximum reasonable price of $ 20, then the search function should check all the minimum acceptable prices to see that they are more than $ 10 and all max-acceptable prices to see that they are less than 20 dollars.

Can this be done using the AngularJS slider? ( http://prajwalkman.imtqy.com/angular-slider/ )

Thanks for your help!

+4
source share
2 answers

:)

How to use the slider to update the upper and lower borders of the price in the area, and then filter by these borders: http://plnkr.co/edit/uF31rMbNLzF382GUZYqr?p=preview

+4
source

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

By specifying these two additional attributes, the slider will start and end based on the anchor values, and not on the specified floor and ceiling.

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

+4
source

Source: https://habr.com/ru/post/1497753/


All Articles