Open page already scrolled at bottom (chat app)


So here is what i did regarding the content automatically scrolls down to bottom when you scroll up.

If you log your scrollToBottom function, you could see that the scrollToBottom function exectues several times on page load and even if you stay idle, it will continue to execute, i suspect it has something to do with two-way binding.

So what i did is this:

scroll = true;
scrollToBottom() {
    if(this.scroll) {
        this.scroll = false;

and it will execute once after page load, what if you want it to automatically scroll again? just set scroll = true again whenever you need it.


Paulo Vitor, este seu chat é código aberto? Quero desenvolver algo parecido.


@DanielRP will reply directly to you


How do i add timestamps inside bubbles?


Continuing the discussion from Open page already scrolled at bottom (chat app):

its always scrolling down can you please help me sir