How to move an element from one div to another using angularjs -


i want move element 1 div div.

lets example there button in div-a , want move in div-b.

it can done in jquery like

$("div-b").append('button'); $("div-a button").remove(); 

but not able think start in angularjs 1x. there series of 10-20 divs in row , want move button 1 div sequentially.

in angular data represented objects

<div ng-repeat="a in ctrl.a"></div> <div ng-repeat="b in ctrl.b"></div>  vm.a = ['a1', 'a2']; vm.b = [];  function move(obj) {     // find obj in vm.a , remove     // push obj in vm.b } 

then view should updated automatically.


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -