Search Posts

Category: nouislider

Using Nouislider to set AngularJS Model

I have an input element bound to my AngularJS controller’s “count” model, a simple slider using Refreshless’s Nouislider library (https://refreshless.com/nouislider/), and an interpolation that uses the “count” model to perform a function and display the returned value. HTML <input id=”countInput” type=”number” min=”1″ max=”2000″ step=”1″ ng-model=”count” /> <!– Slider wrapper –> <div id=”count-slider”></div> <!– Do some math using “count” and display returned value –> {{proportion()}} JS $scope.count = 1000; var countSlider = document.getElementById(‘count-slider’); noUiSlider.create(countSlider, { start: […]