Custom AngularJS Bootstrap Slider

Trying to use this slider with angular


https://github.com/seiyria/angular-bootstrap-slider

I have a job, although I would like to make some custom elements and look at the source doc file, and after too much time I need some direction.

What I'm trying to do with the slider is ...

+1
source share
1 answer

Sorry for the late reply, I just accidentally found this question. I implemented a very similar range slider using seiyria. I added snap frames for my range slider and fully customized it. Perhaps this may help the following. I leave you my options, which I added to my controller, as well as my html for the slider.

CONTROLLER

$scope.testOptions = {
      min: -2.5,
      max: 2.5,
      step: 0.5,
      orientation: 'horizontal',  // vertical
      handle: 'round', //'square', 'triangle' or 'custom'
      tooltip: 'always', //'hide','always'
      tooltipseparator: ':',
      tooltipsplit: false,
      enabled: true,
      naturalarrowkeys: false,
      range: false,
      ngDisabled: false,
      reversed: false,
      ticks: [-2.5,-2,-1.5,-1,-0.5,0,0.5,1,1.5,2,2.5],
      ticks_labels: ['-2.5','-2','-1.5','-1','-0.5','0','0.5','1','1.5','2','2.5'],
      ticks_snap_bounds: 30
    };
    $scope.range = true;
    $scope.slidervalue = "0";

HTML

<div class="col-sm-12">
            <div class="as-slider-container">
              <h4>Adjustment Score</h4>
              <span>Please select an appropriate Score by using the slider below.</span>

              <slider ng-model="sliders.sliderValue" min="testOptions.min" step="testOptions.step" max="testOptions.max" value="testOptions.value" data-slider-handle="custom" ticks="testOptions.ticks" ticks-labels="testOptions.ticks_labels"></slider>
              <div class="slider-label-container">
              <label class="slider-selected-label label-primary label" data-ng-bind="sliders.sliderValue">Scoring</label>
              </div>
            </div>
        </div>

: "ticks_snap_bounds", ( ), /. , 3 ( 50%, 80%, 100%), . , 3 .

, , / . , , .

. , .

+2

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


All Articles