Angular2 execute Method after Rendering (Bootgrid)
<p>i try to use jQuery Bootgrid together with Angular 2. 
The Problem is that that Bootgrid inspects an existing Table, but with angular2 my data is based on an asyncrone source.</p>

<p>I try to initialize the grid later when the data is set in the controller with no luck. I think that the grid have to be initialized AFTER the DOM was updated by angular2. Is there such a "after component-dom update"-Event? Or any other ideas? </p>

<p>Here my Code:</p>

<p><div class="snippet" data-lang="js" data-hide="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>   records: Record[] = []
   grid: any

    ngOnInit() {
        this._recordService.getAllRecords().subscribe(
            data=&gt; { this.records = data },
            error=&gt; { alert(error) }
        )
            .add(() =&gt; setTimeout(() =&gt; this.initGrid(), 50));
    }


    initGrid() {
        this.grid = jQuery("#grid-basic");
        var ref = this;
        this.grid.bootgrid({
          ...config Stuff...

        })
    }</code></pre>
</div>
</div>
</p>

<p>That will work only because of the ugly "setTimeout". Without the timeout the table will display "no data" (my bootgrid info label of the record count is updated with correctly)</p>

<p>Thanks for any ideas!</p>