title: Angular rangeSlider - update
body: <p>I use rangeSlider for filter according to price. I need to make reset button, to set this slider to its default values. </p>
  
  <p><strong>My HTML</strong></p>
  
  <pre><code>&lt;div class="col-md-2 col-xs-12"&gt;
    &lt;div class="col-nav-center"&gt;
      &lt;div class="middle-filter-slider"&gt;
        &lt;input type="text" class="rangeJs" value="" name="range"/&gt;&lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>Initialize slider</strong></p>
  
  <pre><code>function initRangeSlider(min, max) {
    $(".rangeJs").ionRangeSlider({
      hide_min_max: false,
      keyboard: true,
      min: min,
      max: max,
      from: min,
      to: max,
      type: 'double',
      step: 1,
      postfix: " eur",
  
      onStart: function(data) {},
      onChange: function(data) {},
      onFinish: function(data) {
        $scope.filter.priceFrom = data.from;
        $scope.filter.priceTo = data.to;
        priceFactory.requestPrices(null, null, $scope.filter);
      },
      onUpdate: function(data) {
        $rootScope.slider.reset();
      }
    });
  
    $rootScope.slider = $(".rangeJs").data("ionRangeSlider");
  }
  </code></pre>
  
  <p><strong>Function for update</strong></p>
  
  <pre><code>$rootScope.slider.update();
  </code></pre>
  
  <p>When I click on update-button, function update is calling. It updates the values, and returns me all items. It´s fine, but problem is that slider(view) doesn´t set to init (default) state.</p>
  
  <p><a href="https://i.stack.imgur.com/AUGGM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AUGGM.png" alt="enter image description here"></a></p>