Enable automatic scrolling in ionic

I have a project to show some data in ionic 3. Data is loaded from the remote source such as firestore. I can load data without any Problem.
My requirement is enable autoscrolling.When scrolling ends it starts again from the top.
but I couldn’t make even the auto-scrolling using the scrollTobottom().

Why I couldn’t make an automatic scrolling using scrollTobottom().

can someone please explain it and please give me a solution to it…?

Thanks in advance

1 Like

does anybody have a solution…?

i am stuck with this one…

A function that scrolls the content every 5 seconds to a certain height, based on it, you can make a decision:

@ViewChild(Content) content: Content;


scrollToBottom() {
	setTimeout(() => {
		if (this.isScroll && this.content.getContentDimensions().scrollHeight && this.content.contentHeight && this.content.getContentDimensions().scrollHeight > this.content.contentHeight * this.scrollIdx) {
			this.content.scrollTo(0, this.content.contentHeight * this.scrollIdx, 300);
	}, 5000);

Thanks for your valuable response…

lets check it out