0
我正在學習Angularjs和Dragular。使用Angularjs和Dragula在特定的Json條目上放置元素?
我有一個數據集,並在我必須插入數據到另一個容器的數據集值。例如:
這是該數據集
$scope.items1 = [
{
'name' : 'x',
'age' : '4'
},
{
'name' : 'y',
'age' : '5'
},
{
'name' : 'z',
'age' : '6'
}
];
我想的items1
每個元素放到items2
值。 items2
樣子:
$scope.items2 = [
{
'key' : 'aaa',
'value' :""
},
{
'key' : 'bbb',
'value' : ""
},
{
'key' : 'ccc',
'value' : ""
},
{
'key' : 'ddd',
'value' : ""
}
];
一旦它下跌,items2
應該是這樣的:
{
name:'aaa',
value: [{
'key' : 'aaa',
'value' :""
}]
}
的每一個。我該怎麼做呢?
謝謝你這麼多 – TheTechGuy
配車型同步處理https://codepen.io/luckylooke/筆/ KmLGbM – Luckylooke
再次感謝您。我要使用你的庫,我需要使用拖放。它真的很好。它長期以來一直在做我正在尋找的東西。 – TheTechGuy