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 - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -