title: How to subscribe to changes of ElementRef.nativeElement property?
body: <h1>The problem</h1>
  <p>I am trying to figure out the best way to detect changes in UI element width, in order to assign the width into google chart. Google chart doesn't support width in % and exact width needs to be assigned to its options dataset.</p>
  <p>Running on Angular 4</p>
  <h1>My approach</h1>
  <pre class="lang-javascript prettyprint-override"><code>@ViewChild('portlet') public portlet: ElementRef;
  
  ngAfterViewInit() { // same issue if used in ngOnInit()
     this.widthObservable = new BehaviorSubject&lt;number&gt;
        (this.portlet.nativeElement.offsetWidth);
     this.widthObservable.asObservable().subscribe(e =&gt; {
        console.log('Width changed', e);  // only fires once for e=0 
        // ...
        // set google chart dataset width property
        // chart.redraw();
     });
     ...
  }
  </code></pre>
  <p>I'm only ever getting 1 console log message <code>Width changed 0</code>. When I set breakpoint anywhere in the code (after UI initialization) I can see the <code>this.portlet.nativeElement.offsetWidth</code> has non-zero value. This is expected, because the UI component renders, however I don't understand why the observable doesn't fire up again.</p>
  <h1>Questions</h1>
  <ul>
  <li>Is this the best approach?</li>
  <li>Why is my observable only firing once?</li>
  </ul>