title: how to scroll the list to top on button click in angular?
body: <p>could you please tell me how to scroll the list to top on button click in angular ?
  I tried like this</p>
  
  <pre><code> scrollToTop(el){
      el.scrollIntoView();
    }
  
    &lt;button (click)="scrollToTop(target)"&gt;scroll to top&lt;/button&gt;
  </code></pre>
  
  <p>It scroll the list to top .but it hide my <code>addressbar</code> and then user not able see <code>header</code> I think it is not a good solution .anybody have any other good solution</p>
  
  <p>here is my code
  <a href="https://stackblitz.com/edit/angular-f9qxqh?file=src%2Fapp%2Fapp.component.html" rel="noreferrer">https://stackblitz.com/edit/angular-f9qxqh?file=src%2Fapp%2Fapp.component.html</a></p>