如何替換ng-repeat中的值。在ng重複中替換對象
<div ng-repeat="item in test">
<input type="text" data-ng-model="item.qty">
</div>
$scope.test = [
{"InventoryItemID":78689,"Location":"My Location",qty:"2"},
{"InventoryItemID":78689,"Location":"My Location",qty:"1"}
]
現在我必須用test1的數量替換測試的數量。我怎樣才能做到這一點。
$scope.test1 = [
{qty:"6"},
{qty:"6"}
]
我不知道如果我理解你的問題,你可以試着重新措辭嗎? – Jordumus
他們有相同的索引嗎? – taguenizy
@Jordumus:我必須用$ scope.test1替換$ scope.test數量值qty – Felixerity