title: Angular: Scroll dynamic element into view knowing only its ID
body: <p>I have a dynamic list that gets its data asynchronously, and would like to scroll an specific element into view when the list is loaded. </p>
  
  <p>The list is build similar to this:</p>
  
  <pre><code>&lt;div class="items" *ngFor="let item of functionThatGetsItems(); let i = index" [id]="'MyList' + i"&gt;
      &lt;div class="title"&gt;
          {{ item.title }}
      &lt;/div&gt;
      &lt;div class="content"&gt;
          {{ item.content }}
      &lt;/div&gt;
    &lt;/div&gt;      
  </code></pre>
  
  <p>As you can see, the items have an ID assigned that is simple a base string and their number. Let's say I want to trigger a scroll to <code>MyList31</code>. Once the list is loaded and rendered, how do I fetch the element with such ID and scroll to it?</p>
  
  <p>I've searched around and found the ways you should <em>not</em> do it, and how to do it using ViewRefs, but these don't seem to work on dynamic elements, or do they? How would I do this? </p>