How to retain scroll position of ng-repeat in AngularJS?

前端 未结 9 1466
梦谈多话
梦谈多话 2020-12-05 00:47

DEMO

List of objects is rendered using ng-repeat. Suppose that this list is very long and user is scrolling to the bottom to see some objects.

W

9条回答
  •  余生分开走
    2020-12-05 01:16

    You could defer adding the items until the user scrolls the top of the list into view. There is no point rendering the items before.

    It could look like this (perhaps with an added animation).

提交回复
热议问题