title: Angular5: When angular finished page loading?
body: <p>In my angular5 application, I am using a table. And data in the table comes from the backend. When the table is fully loaded for the first time, I want to change the scroll position inside the table. For that I am doing this:</p>
  
  <pre><code>ngAfterViewInit() {
      setTimeout(function () {
          const scroller = document.getElementById('list-container');
          scroller.scrollTop = amountTop; // amountTop is the calculated height, which represents the centre of the table 
      }, 500);
  }
  </code></pre>
  
  <p>Is there any better way for DOM manipulation for this instead of using setTimeout() function?</p>