Answer the question
In order to leave comments, you need to log in
How to properly implement infinite scroll in angular?
Now there is this code:
$elem.scroll(function () {
if ($ctrl._loading) return;
if ($elem.scrollTop() - 50< 0) {
$ctrl.onScrolled.call($ctrl.context)
}
})
var sh = raw.scrollHeight
....
raw.scrollTop = raw.scrollHeight - sh;
ng-init=($last?finished():null)
this.getMessages(req)
.then(({items}) => {
this.messages.unshift(...items.reverse());
this.isGettingScrolledMessages = false;
this.$rootScope.silent = true;
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question