Asad Ali
Asad Ali

Reputation: 397

input type range does not work inside angularjs repeat

I have problem in input type range to get it's value on change method. The problem is it si working if ti is outside of the ng-repeate. I have search a lot but find any solution yet. I attached Plnkr file where you can see the code and all: https://embed.plnkr.co/pEKXfPiR1tNHD4G2yDmU/

There ware soem example that I found, I am adding here for reference to solve this problem. HTML Range Slider and jQuery?

Upvotes: 0

Views: 214

Answers (2)

Zoltan Toth
Zoltan Toth

Reputation: 47667

You are attaching your listeners before the DOM has been created. You need to use document.ready()

$(function() {
  $('#chanceSlider0').on('change', function() {
    $('#chance0').val( $('#chanceSlider0').val() );
  });
});

DEMO

Upvotes: 1

gandharv garg
gandharv garg

Reputation: 2171

You are trying to mix jquery and angularjs which is not a good thing and is not recommended. i would suggest you have a look at

https://github.com/angular-slider/angularjs-slider

Upvotes: 0

Related Questions