title: Angular 2 get element height
body: <p>I have a really simple example here</p>
  
  <p>Its just an angular app with a single div </p>
  
  <p>Is it possible to get the height of the div in angular</p>
  
  <p>I thought I could do it with @ViewChild and offsetHeight</p>
  
  <pre><code>import {Component, ElementRef, ViewChild} from '@angular/core';
  
  @Component({
    selector: 'my-app',
    templateUrl: './src/app.html'
  })
  
  export class AppComponent{
  
    @ViewChild('content') elementView: ElementRef;
  
    contentHeight: number;
  
    constructor() {
  
    }
  
    //contentHeight = this.elementView.nativeElement.offsetHeight
  
  }
  </code></pre>