title: Getting element height
body: <p>I was curious if I can get element properties form component template.
  So I have made simple div with class and I've made this class:</p>
  <pre class="lang-ts prettyprint-override"><code>export class viewApp{
  
    elementView: any;
    viewHeight: number;
    myDOM: Object;
  
    constructor() {
      this.myDOM = new BrowserDomAdapter();
    }
  
    clickMe(){
      this.elementView = this.myDOM.query('div.view-main-screen');
      this.viewHeight = this.myDOM.getStyle(this.elementView, 'height');
    }
  }
  </code></pre>
  <p><code>getStyle()</code>, <code>query()</code> are from <a href="https://angular.io/docs/ts/latest/api/platform/browser/BrowserDomAdapter-class.html" rel="noreferrer">BrowserDomAdapter</a>.
  My problem is when I try to get height it is <code>null</code>, but when I set some height by <code>setStyle()</code> and then I get it by <code>getStyle()</code> it returns proper value.
  After checking DOM and styles in browser I discovered that is because of two CSS elements. One is: <code>.view-main-screen[_ngcontent-aer-1]{}</code> and second one is <code>element{}</code>.
  <code>.view-main-screen</code> has some stylings, but element is empty. When I add styles by <code>setStyle()</code> it appears in <code>element{}</code>. Why is that? How can I get element properties by using Angular2?</p>