I am making a web application.
I have a dynamic table . First you select PRODUCT and then LOT . The list of items in the list is selected by json. Now the problem is that I want to add the ability to create a new item to add to the <select> LOT .
So, first I tried to add a field in the LOT column using the following codes:
$scope.addLot = function(id,val,lotId) {
var inWhichProduct = id;
var newArray = { "value": val, "id": lotId };
angular.forEach($scope.items,function(v,i){
if($scope.items[i].id == id )
{
$scope.items[i].lots.push(newArray);
console.log($scope.items[i].lots);
}
});
};
( ). , , . , ( - ). ? , json, LOT, json?