title: Angular5 ngAfterviewchecked , scrollIntoView()
body: <p>on page load, it should scroll down to a specific div I did that using below function, but the issue is after page load, its giving me issues while scroll up and down, the below function doesn't let me scroll up and down properly. </p>
  
  <pre><code>ngAfterViewChecked(): void{
  
      if (this.primary){
        setTimeout(() =&gt; {
      this.scrollTo.nativeElement.scrollIntoView();
        },100);
    }
    }
  </code></pre>
  
  <p>I didn't use timeout, so scroll was not moving from the div position. It was fixed there. But once I used setTimeout it start moving but still gives me issue. I just want to use scrollIntoView on page load.</p>