how check if the data is complete load to use async pipe Angular 8

Viewed 669

I have a json file to simulate a request to an API I am using httpClient in my service I return it

service

enter image description here

this is my home component

enter image description here

this is my html home component

enter image description here

but I am doing something wrong because I can print the data but, one of the element is render empty this is the result I have

enter image description here

How I can prevent this I am new on this thanks so much in advance.

1 Answers

In your home component template; it looks like you are rendering a component called app-card just before your *ngFor loop.

Could that be the empty card.

<div class="col-md-4>
  <app-card></app-card>
</div>
Related