Angular 2 Data-Binding and setTimeout
<p>It seems that changing a component's attribute inside a 'setTimeout' function doesn't work on the initial page load. </p>

<p>Let's say I have a component 'HomeComponent' with attribute:</p>

<pre><code>isValueTrue: boolean = false;
</code></pre>

<p>If I apply this attribute to an HTML element using data-binding:</p>

<pre><code>&lt;div [class.myClass]="isValueTrue"&gt;&lt;/div&gt;
</code></pre>

<p>and set the value in my ngOnInit() class like:</p>

<pre><code>this.isValueTrue = true;
</code></pre>

<p>It works!</p>

<p>However, if I apply it this way: </p>

<pre><code>let comp = this;
setTimeout(() =&gt; comp.isValueTrue = true, 1000);
</code></pre>

<p>It won't get set on the initial page load. It will however work on subsequent page visits, but not after a hard refresh.</p>

<p>I have no idea why this doesn't work, but I'm hoping it's something that was fixed in the most recent build. My project is currently using RC 5, so I'm upgrading to 2.0.0 (2016-09-14) at the moment.</p>

<p>Any ideas why this happens? Is it fixed in recent builds?</p>