I have two divs, one starts empty, the other has some predefined items. On clicking items in one list, the other list gets items added to it.
What I would like to achieve is to animate items from one list to appear to physically move to the other. (I would like items to move from right to left). I don't know too much about CSS animations, or AngularJS animation. In jQuery, I could just call $().animate() on the div id to modify the properties.
How would I go about doing the same thing in AngularJS?
JS:
var app = angular.module('app', []);
app.controller('Ctrl', function ($scope) {
$scope.selectedItems = [];
$scope.items = ['a', 'b', 'c'];
});
HTML:
<div ng-controller="Ctrl">
<div class='container'>
<div class='inline selected-container' >
<div ng-repeat='selected in selectedItems track by $index'> <!-- I would like items to appear here after items from other container have finished moving -->
{{selected}}
</div>
</div>
<div class="inline">
<!-- I would like to push these items left on click -->
<div class='inline box' ng-repeat="item in items" ng-click="selectedItems.push(item);">
{{item}}
</div>
</div>
</div>
</div>
Here is a link to what I have so far: