title: Angular2 *ngFor loop getting height of each loop (Only gets first one)
body: <p>I have a ngFor loop like so: <code>&lt;div  *ngFor="let group of catt" id="juliet" [ngClass]="hf()"&gt;</code> where I call the hf() function each time which looks like so:</p>
  
  <pre><code>hf() {
      this.heighty = document.getElementById('juliet').offsetHeight;
      console.log("juliet function height = " + this.heighty);
  
    }
  </code></pre>
  
  <p>But the for loop goes through 4 times for the data, but only gives the height of the first loop, and then gives that same height for each loop their after. When I inspect the elements I see the 4 loops with different heights. I also do not see an identifier for each loop, like <code>juliet[0]</code>. How do I get the heights for each loop of the for loop? </p>