In my view, the user double click on a row and the details will pop up with input have been filled up by ng-repeat, the user could change the values, but my problem is that i can't get the new value of the input.
My view:
/* This dislay the inputs with the value, ng-dblclick will get the input values*/
<tr ng-repeat="sf in selectedFacture" ng-dblclick="editFacture();" >
<td><input class="cls" value="{{sf.fcls_crt}}" type="text"/></td>
<td><input class="piece" value="{{sf.fpiece}}" type="text"/></td>
<td><input class="cls_gate" value="{{sf.fcls_crt_gate}}" type="text"/></td>
<td><input class="piece_gate" value="{{sf.fpiece_gate}}" type="text"/></td>
<td><input class="note" value="{{sf.note}}" type="text"/></td>
</tr>
JS:
// This function gets the **edited** values by input' class
$scope.editFacture=function(){
var editedQuanCls=$(".cls").val();
var editedQuan_piece=$(".piece").val();
var editedQuan_cls_crt_gate=$(".cls_gate").val();
var editedQuan_piece_gate=$(".piece_gate").val();
var editedNote=$(".oNote").val();
var editedNote_gate=$(".note").val();
alert(editedQuanCls + " - " + editedQuan_piece + " - " + editedQuan_cls_crt_gate + " - " + editedQuan_piece_gate + " - "+ editedNote + " " + editedNote_gate);
}
My problem is that the function is only returning the values of the first tr in the ng-repeat, what should i add to get all values? many thanks in advance