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

前端 未结 9 1434
梦谈多话
梦谈多话 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 00:56

    You know other people are trying to solve this problem using a different approach in terms of UI. They don't just POP new items on top, but instead they show a small clickable link on top stating how many new items are added since he last checked it.

    [2 new items, Click here to refresh]
    
    item 5
    item 4
    item 3
    

    Check out how twitter is solving this. **[Let me attach a screenshot for you shortly.]**

    I know it's a bit contradicting with want you want, but perhaps this is better in terms of UX? User wants to know if there are new items coming in.

提交回复
热议问题