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++ - llvm function pass ReplaceInstWithInst malloc -

java.lang.NoClassDefFoundError When Creating New Android Project -

Decoding a Python 2 `tempfile` with python-future -