I'm new to AngularJS 2.0, basically I'm loading data through Promise in constructor, but the template is rendered before the promise is resolved.
Any idea how to achieve this?
Thanks, M.
You can test the data
before using it.
<ul *ngIf="data">
<li *ngFor="let item of data">{{item.value}}</li>
</ul>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With