I have an ion-list that works just fine when i run ionic serve but when I build for android and run on my phone the list appears (I can see the item separators) but there is no content (or it is not visible) so it seems like the data is there. Any thoughts? Thanks in advance!
<ion-list *ngSwitchCase="'buying'">
<ion-item *ngFor="let order of orders.buying" (click)="itemSelected(order)">
<h2>#{{order.id}} - {{order.seller_org_name}}</h2>
<p><b style="color:#00CC33">{{order.total | currency:'USD':true:'1.2-2'}}</b> [{{order.status}}]</p>
<ul>
<li *ngFor="let order_item of order.order_items">
{{order_item.title}}
</li>
</ul>
</ion-item>
</ion-list>
I meet the same issue, after a setTimeout I’m surprised to see no list’s items.
Althought I used AlertController wich displayed correctly the request return : sqlStorage works finely ! But none item of ion-list component !
Are you initializing data to an empty array like data = []? If you aren’t, do so. Anything walked by ngFor in the template must be an array at all times.
@rapropos
I extracted a piece of code which is right. You are right : this basic feature works as it must do it !
But I didn’t find my error into complex method on home.ts nor data-services.ts not visible here, it is reserved to be displayed for customers that I works for !
Thanks.