How to delay component instantiation until data from service is received in Angular 2?
One way would be to use the ngIf
directive.
Something like...
<img *ngIf="user.avatar" class="user-avatar" [src]="'data:image/png;base64,' + user.avatar">
Then the element won't then be rendered in the page until the user.avatar
is truthy.