title: Calculate height of element when clicking on another - Angular 4
body: <p>I am trying to do the following: when clicking on one element, I open another one. I need to calculate the height of that element I just opened.</p>
  
  <p>I don't know how to do it because I have no event on the element I am opening, I will provide a small example code just so you get the idea what I want to do.</p>
  
  <pre><code>&lt;div class="parent"&gt;
    &lt;div class="left"&gt;
      &lt;div (click)="openRight = !openRight" class="click-element"&gt;&lt;/div&gt;
    &lt;/div&gt;
    &lt;div *ngIf="openRight" class="right"&gt;
  
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The goal is to dynamically set the height of left element based on the height of right element. Right element will have position absolute, that is the reason I need to get the height.</p>
  
  <p>Thanks in advance!</p>