Angular2 Notifying the template of a change
<p>Here is my code :</p>

<pre><code>@Component({
    selector: "foo",
    template: `
      &lt;span&gt;Init : {{o.init}}&lt;/span&gt;
      &lt;span&gt;Loaded data : {{o.loadedData}}&lt;/span&gt;
    `,
    providers: [
        Services
    ]
})
export class FooComponent implements OnInit{
   constructor (private _services: Services) {}

   o: Object
   ngOnInit() {
      o = {"init": "foo"}
      this.services.randomCall()
          .subscribe(
              res =&gt; this.o["loadedData"] = res["loadedData"]  
          )
   }
}
</code></pre>

<p>So <code>o.loadedData</code> doesn't appear everytime due to a race condition between my <code>randomCall()</code> and the template rendering. What I would like would be to notify angular after having assigned <code>o["loadedData"] = res["loadedData"]</code>. In angular1, I would have done a call to the scope's <code>digest()</code> function.</p>

<p>How can I do something similar in angular2 ? </p>

<p>Thanks !</p>

<p>Edit: I added back this, it was a typo.</p>