I have a table generetad via PHP while and handled by AngularJS:
<table>
<tr>
<th>Col 1</th>
<th>Col 2</th>
<th>Col 3</th>
</tr>
<?php
while(...){
?>
<tr>
<td>
<input type="text" ng-model="calcolo.ore">
</td>
<td>
<input type="text" ng-model="calcolo.ricavo">
</td>
<td>
<input type="text" ng-model="calcolo.abbatt">
</td>
<td>
<input type='text' ng-show="calcolo.abbatt" value='{{netti() | currency:"€"}}'>
</td>
</tr>
<?php } ?>
angular.module("myApp", ['ng-currency'])
.controller("userController",
function($scope) {
$scope.fattlord = function() {
return ($scope.calcolo.ore * $scope.calcolo.ricavo)
};
$scope.netti = function() {
return ($scope.calcolo.ricavo-(($scope.calcolo.abbatt * $scope.calcolo.ricavo)/100))
};
});
Of course, when I write into a text input, all the the inputs with same ng-model get the same value.
Is there a way in Angular, maybe with IDs, that allows me compiling row by row, without change the others?
Sorry for bad english and thank you!
PS: I can't use ng-repeat.