javascript - undefined object of AngularJS form -
i need enter variables of ng-repeat, run problem when enter these variables there 2 variables undefined, , not different rest, because happens, variables "pies_tablares" , "observacion":
<tr ng-repeat="table in datos"> <td> <input type="text" class="form-control" ng-model="especie" ng-value="table.especie" readonly> </td> <td> <input type="text" class="form-control" ng-model="largo" ng-value="table.largo" readonly> </td> <td> <input type="text" class="form-control" ng-model="ancho" ng-value="table.ancho" readonly> </td> <td> <input type="text" class="form-control" ng-model="espesor" ng-value="table.espesor" readonly> </td> <td> <input type="text" class="form-control" ng-model="cantidad" ng-value="table.cantidad" readonly> </td> <td> <input type="text" class="form-control" ng-model="pies_tablares" ng-value="table.pt" readonly> </td> <td> <input type="text" class="form-control" ng-model="observacion"> </td> </tr>
here undefined:
angular.foreach($scope.datos, function(obj) { dataconcilation = { especie: obj.especie, largo: obj.largo, ancho: obj.ancho, espesor: obj.espesor, cantidad: obj.cantidad, pies_tablares: obj.pies_tablares,//undefined observacion: obj.observacion, //undefined purchase_order_id: idpurchaseconcilation, fecha_conciliacion: moment().format('yyyy-mm-dd hh:mm:ss') };
how can fix this?
not sure want why not try put ng-value these variables ?
<td> <input type="text" class="form-control" ng-model="pies_tablares" ng-value="table.pies_tablares" readonly> </td> <td> <input type="text" class="form-control" ng-model="observacion" ng-value="table.observacion" readonly> </td>
Comments
Post a Comment