title: How to make ionic 3 autoscroll for chat app work?
body: <p>I have tried every solution but nothing has worked. I am building a chat app where i want it to be scrolled to last message automatically,also when new message comes it scrolls to the bottom.</p>
  
  <p>I have tried scrollTo() on the #content but it doesn't work </p>
  
  <p><strong>chat.html</strong></p>
  
  <pre><code>&lt;ion-content #content *ngIf="buddy"&gt;
    &lt;div class = "chatwindow"&gt;
      &lt;ion-list no-lines *ngIf="allmessages"&gt;
        &lt;ion-item *ngFor = "let item of allmessages; let i = index" text-wrap&gt;
          &lt;ion-avatar item-left *ngIf="item.sentby === buddy.uid"&gt;
            &lt;img src="{{buddy?.photoURL}}"&gt;
          &lt;/ion-avatar&gt;
          &lt;div class="bubble me" *ngIf="item.sentby === buddy.uid"&gt;
            &lt;h3 *ngIf="!imgornot[i]"&gt;{{item.message}}&lt;/h3&gt;
            &lt;img src="{{item?.message}}" *ngIf="imgornot[i]"&gt;
          &lt;/div&gt;
          &lt;ion-avatar item-right *ngIf="item.sentby != buddy.uid"&gt;
            &lt;img src="{{photoURL}}"&gt;
          &lt;/ion-avatar&gt;
          &lt;div class="bubble you" *ngIf="item.sentby != buddy.uid"&gt;
            &lt;h3 *ngIf="!imgornot[i]"&gt;{{item.message}}&lt;/h3&gt;
            &lt;img src="{{item?.message}}" *ngIf="imgornot[i]"&gt;
          &lt;/div&gt;
        &lt;/ion-item&gt;
      &lt;/ion-list&gt;
    &lt;/div&gt;
    &lt;/ion-content&gt;
  </code></pre>
  
  <p><strong>chat.ts</strong></p>
  
  <pre><code>      @ViewChild('content') content: Content;
    scrolltoBottom() {
      setTimeout(() =&gt; {
     //   this.content.scrollToBottom();
      }, 1000);
    }
  </code></pre>