Stack Overflow is a community of 4.7 million programmers, just like you, helping each other.

Join them; it only takes a minute:

Sign up
Join the Stack Overflow community to:
  1. Ask programming questions
  2. Answer and help your peers
  3. Get recognized for your expertise

I want to pass a value on changing the 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 to use any plugins or whatever. Just a simple answer. Thanks. :)

share|improve this question
up vote 1 down vote accepted

1st thing you need to use ng-model directive with value, which will be available in controller $scope & then place ng-change event over that input element.

Markup

<input type="range" value="30" min="0" max="0" id="set-value" 
  ng-model="sliderModel" ng-change="passValueHere(sliderModel)"/>
share|improve this answer
    
Thanks very much. It helped me, – CodeGeeky 18 hours ago
    
@CodeGeeky Glad to hear that..Thanks :) – Pankaj Parkar 18 hours ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.