1
document.getElementById(productrate).value = data[0].purches_rate;

I am getting product rate value form js using above line

<input type="text" class="form-control" name="productrate"  id="productrate{{$index}}"/>

But unable to passing that value in below change function

<input type="text" class="form-control" name="finalqty" ng-model="finalqty"   ng-change="change_qty(productrate,finalqty)"/>

How can i Input value to ng change function in ng repeat. Is there any solution? please help

Thanks you

TarangP
  • 2,711
  • 5
  • 20
  • 41
konda
  • 185
  • 1
  • 12
  • Don't use ng-model without a dot. You should put finalqty in an object like `$scope.form = {finalqty: 0};` and write `ng-model="form.finalqty"`. It's a classic problem with scope. – Pierre Emmanuel Lallemant Feb 24 '18 at 09:04
  • Not a problem with finalqty, problem is i need to pass productrate in change_qty function – konda Feb 24 '18 at 09:40
  • Can't get what you're doing here... Could you create a jsfiddle ? – korteee Feb 24 '18 at 10:56
  • kindly refer https://stackoverflow.com/questions/48946868/unable-to-assign-the-document-getelementbyid-value-to-ng-model-in-ng-repeat?noredirect=1#comment84903653_48946868 – konda Feb 24 '18 at 11:13

0 Answers0