animate.css on first element of ng-repeat

Viewed 227

I have an array that displays elements via ng-repeat. When i add elements to the array I want them to flip in.

(js) $scope.tags.unshift(tag)

(css) .data-tag.ng-enter { animation:0.5s flipInX ease; }

(html) <div class="data-tag" ng-repeat="tag in tags">

the problem is that the animation is executed on the last element instead of the first. I need to use unshift() because i want the new element to appear first. the behaviour is as expected when using push() but then the order of the elements is not what i want (new elements get added to the bottom)

Visual of behaviour

0 Answers
Related