title: Scroll to specific div on (click) in Angular
body: <p>I have a <code>#content</code> div and a button component. </p>
  
  <p>When I click the button, I want to scroll to the top of the #content div.</p>
  
  <hr>
  
  <p>HTML:</p>
  
  
  
  <pre><code>&lt;div id="content"&gt;
      Loren ipsum 
  &lt;/div&gt;
  &lt;div (click)="toTop($event)"&gt;top&lt;/div&gt;
  </code></pre>
  
  <p>topscroll.component.ts:</p>
  
  <pre class="lang-js prettyprint-override"><code>export class TopscrollComponent implements OnInit { 
    constructor() { } 
  
    ngOnInit() { }
  
    toTop(event){ 
      ...
    }
  }
  </code></pre>