Angularjs ile yeni yaşıyorum. Bu problemi aldım. Birkaç sorularda bulduk ama kimse bana lütfen yardımcı olabilir benimle Mentionned ama hiç iş olarak $ endeksine göre parça kullanılmış çünkü kimse benim için faydalı oldu
html: burada
<table>
<tbody>
<tr class="main-heading">
<th>Images</th>
<th class="long-txt">Product Description</th>
<th>Numero de serie</th>
<th>Price</th>
<th>Total</th>
</tr>
<tr class="cake-bottom" data-ng-repeat="product in chosenPdtByQte track by $index">
<td class="cakes">
<div class="product-img2"></div>
</td>
<td class="cake-text">
<div class="product-text">
<h3>{{product.nameProduct}}</h3>
<p>Product Code: {{product.numserie}}</p>
</div>
</td>
<td ng-init="fetchNumSerie(product.id)">
<select name="singleSelect" ng-model="selecteOperation" ng-options="pdt as pdt.id for pdt in numSeries" >
</select>
</td>
<td>
<h4>{{product.price}}</h4>
</td>
<td class="top-remove">
<h4>{{product.price*quantite[product.id]}}</h4>
<div class="close-btm">
<h5>Remove</h5>
</div>
</td>
</tr>
</tbody>
</table>
Ve is my Ben
for (var i =0; i< $scope.chosenProducts.length; i++)
{
console.log(" lllll "+$scope.chosenProducts[i].quantite +" "+$scope.quantite[$scope.chosenProducts[i].id]);
for (var j=0; j<$scope.quantite[$scope.chosenProducts[i].id]; j++)
{
$scope.chosenPdtByQte.push($scope.chosenProducts[i]);
}
}
Soruna neden "ng-repeat" olduğundan emin misiniz? 'ng-options 'aynı yineleyiciye izin verilmez' hatalarını atacaktır, yani 'numSeries''in benzersiz olduğunu iki kez kontrol etmelisiniz. – Scott
Eminim ng-options bile kullanmadan önce bu problemi alıyorum çünkü – yeddez
Neler olup bittiğini görmek için bir keman veya benzer bir şey sağlayabilir misiniz? –