Reputation: 385
its'a chat page, I am scrolling to the bottom of the page on
ionViewDidEnter
ionViewDidEnter(){
this.content.scrollToBottom();
}
I would like it scroll to the bottom without the scrolling animation, in other words just show the bottom of the page like whatsapp chat. when you click on a chat, it scrolls down to the recent chat to the bottom of the page.
Upvotes: 1
Views: 1672
Reputation: 44659
One way to do that would be by using the scrollDownOnLoad
input property from the ion-content
:
<ion-content scrollDownOnLoad="true">
...
</ion-content>
If you want to have more control over when the content scrolls to the bottom of the page, but you don't want to show any animations during the scroll, you can set the duration of the scrollTobottom()
method to be 0 like this:
this.content.scrollToBottom(0); // The default is 300ms
Upvotes: 1