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

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -