Can I run a component method only in the client using Angular2 Universal?
<p>I am writing an <a href="https://github.com/angular/universal">angular2 universal</a> app. It has a <a href="https://d3js.org/">d3</a> chart, but I was hoping to only render the d3 chart on the client side (browser) and not try to render it on the server. Is there an interface in angular2 universal that will only run a component method only on the client side?  </p>

<p>i.e.</p>

<pre><code>class ComponentWithChart implements OnInit, ngUniversalBrowser {

  elem;

  constructor( private viewContainerRef:ViewContainerRef) {}

  ngUniversalBrowserOnInit() {

    this.elem = this.viewContainerRef.element.nativeElement;

    d3.select(this.elem).append('div').style({
      'background-color':'yellow'
    });
  }
}
</code></pre>

<p>Is there anything like the example above that might allow me to only run the <code>ngUniversalBrowser</code> method only in the browser <code>OnInit</code>?</p>