title: How to get width of absolute positioned element in Angular
body: <p>I'm trying to get the width off a component but it is 0. I've also tried putting the code in ngOnChanges().</p>
  
  <pre><code>constructor(private element: ElementRef) {
    this.htmlElement = this.element.nativeElement;
    let width = this.htmlElement.offsetWidth;
  }
  </code></pre>
  
  <p>Element style:</p>
  
  <pre><code>display: block;
  position: absolute;
  left: 100;
  </code></pre>
  
  <p>I tried using clientWidth() but it is 0 too. How can I get the width of an element in angular 2?</p>
  
  <p><strong>Update:</strong></p>
  
  <p>I don't use position absolute and the width is correct, so I suppose the question is how do I get the width of an absolute positioned element?</p>