Alfredo Izquierdo
Alfredo Izquierdo

Reputation: 167

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

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.

Upvotes: 2

Views: 909

Answers (1)

C.OG
C.OG

Reputation: 6527

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>

Upvotes: 3

Related Questions