title: Angular 2 navigate to element in *ngFor using interpolation
body: <p>I am using Angular 2 and looking to set-up a page where the contents are displayed through an <code>*ngFor</code> loop, and the body is displayed through a separate div. These use interpolation to display the objects relevant properties. I would like the content to link to the relevant div in the body.</p>
  
  <p>To display the contents in the left hand side:</p>
  
  <pre><code>&lt;div class = "contents"&gt;
    &lt;div *ngFor = "let disp of content"&gt;
      {{disp.heading}}
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>To display the article on the right hand side</p>
  
  <pre><code>&lt;div *ngFor="let disp of content&gt;
    {{disp.header}}
    {{disp.body}}
  &lt;div&gt;
  </code></pre>
  
  <p>This is similar to the query here <a href="https://stackoverflow.com/questions/36101756/angular2-routing-with-hashtag-to-page-anchor">Angular2 Routing with Hashtag to page anchor</a></p>
  
  <p>However, as it is in an <code>*ngFor</code> loop dependent on content, abd uses interpolation, I cannot see a way to identify different divs within the loops as these are provided dynamically.</p>