0

I found this example on Google.

Is there a way to start with following properties:

  $scope.slider_all_options = {
minValue: 0,
maxValue: 100,
options: {
  floor: 1,
  ceil: 100,
  step: 1,
  precision: 0,
}

};

Then change the minValue to 1 for the RangeSlider if the checkbox is checked and back to 0 when the Checkbox is unchecked? I cannot solve this problem at the moment.

Please take a look at my JSFiddle:

Here is my JSFiddle

M osley
  • 11
  • 3

1 Answers1

0

I did this JSFiddle, I think it is what do you need.

Just add the model to you checkbox:

<input type="checkbox" ng-click="toggleHighValue()" ng-model="check">

And implement the toggle function like this:

  $scope.toggleHighValue = function() {
  if ($scope.check) {
      $scope.slider_all_options.minValue = 1
    } else {
      $scope.slider_all_options.minValue = 0
    }
  }
L. Figueredo
  • 278
  • 2
  • 11