angularjs - Passing data to angular function on changing html slider input -


i want pass value on changing html slider input in angularjs.

<input type="range" value="30" min="0" max="0" id="set-value" /> 

angular function:

$scope.passvaluehere = function(value) {   //todo here } 

i don't want use plugins or whatever. simple answer. thanks. :)

1st thing need use ng-model directive value, available in controller $scope & place ng-change event on input element.

markup

<input type="range" value="30" min="0" max="0" id="set-value"    ng-model="slidermodel" ng-change="passvaluehere(slidermodel)"/> 

Comments

Popular posts from this blog

C++: Boost interprocess memory mapped file error -

python - IO.UnsupportedOperation: Not Writable -

python - Selecting distinct values from a column in Peewee -