How to check whether ngIf has taken effect
<p><strong>What I'm Doing</strong><br>
I have a component that hides/shows using <code>*ngIf</code> based on a simple Boolean. When the component becomes visible I want to apply focus to a child element within its template.</p>

<p><strong>The Problem</strong><br>
If I flip the Boolean value the component shows correctly but if I then try and get a reference to the child element using <code>this._elRef.nativeElement.querySelector("div#test")</code> it just comes back <code>null</code>. If I wait a few seconds the same code will return the reference to the element as I expected.</p>

<p><strong>Speculation</strong><br>
I'm assuming that after flipping the Boolean angular goes through a whole rendering cycle to reveal the newly visible component and that this has not finished by the time I apply the <code>querySelector()</code> in the next line.</p>

<p><strong>What I'd Like To Know</strong><br>
So what I'm wondering is, how can I be sure that my <code>ngIf</code> has taken effect and the elements are their in the DOM to be selected?<br>Is there such a thing as a callback for <code>ngIf</code> or can I force the view to update and get a callback from that?</p>

<p>I hope this makes sense. It has been a long day (long week) and I'm super tired.<br>Thanks all</p>

<p>If it helps, I'm using Angular2 v2.0.0-beta.15</p>