List reorder animation with angularjs

前端 未结 2 1483
谎友^
谎友^ 2020-12-15 06:13

I\'m working on a project in angularjs that has a list of objects which update in real time and will be reordered with each update. I want to animate these objects moving s

相关标签:
2条回答
  • 2020-12-15 06:31

    I think I've accomplished what you're looking for here: http://codepen.io/daleyjem/pen/xbZYpY

    By using track by, I'm able to keep the DOM elements from being recreated, and can then manipulate their position.

    <div ng-repeat="item in items | orderBy:sorter track by item.id" class="item" jd-script>
        {{ item.id }}: {{ item.last_name }}, {{ item.first_name }}
    </div>
    
    0 讨论(0)
  • 2020-12-15 06:48

    I think this is what you are looking for : http://www.nganimate.org/angularjs/ng-repeat/move

    0 讨论(0)
提交回复
热议问题