I'm using this rangeSlider and a search filter for a table list with items of a WebAPI. My problem is, that the search filter isn't synchronized with the rangeslider in my search form. To imagine it better I show you the currently code snippet:
//Person view:
//rangeSlider
<div class="form-group form-group-sm">
<label class="col-sm-3 control-label">Age:</label>
<div class="col-sm-8">
<div range-slider min="0" max="100" model-min="demo.min" model-max="search.age" pin-handle="min" show-values="true" ng-model="search.age">
</div>
</div>
</div>
...
//table list with items
<tr ng-repeat="person in personslist | filter:search">
<td>{{ person.id }}</td>
<td>{{ person.fname }}</td>
<td>{{ person.age }}</td>
</tr>
...
//PersonCtrl
$scope.demo = {
max: 100,
min: 0
};
I think the ngModel in the rangeSlider Directive doesn't grab the value search.age. In the attribute model-max I've added also search.age. When I'm looking for max number 8 in my search form then it is displaying persons with the ages 8,18,38 and so on. But the result have to be 0-8. How can I solve this? I also have tried to define a function in the attribute on-handle-up but I don't know how to grab the item in filter: search.