I’m trying to get the values from my API but I can’t show the in ion-list.
In the image you can see that the data is loaded but I can’t show them in ion-list
I try tho show the in this way
<ion-list>
<ion-item *ngFor="let item of (results | async)">
<ion-label text-wrap>{{item.nombreProducto}}</ion-label>
<ion-button color="light"><img src="../../assets/icon/binoculars.png" alt="" (click)="presentarModal()" item-end></ion-button>
<ion-button color="light"><img src="../../assets/icon/cart.png" alt="" (click)="addCart()" item-end></ion-button>
</ion-item>
</ion-list>
I’ve created a service that have a method called getAll
getAll(): Observable<any>{
return this.http.get(`${this.url}`).pipe(
map(results=>{
console.log('Data', results);
return results['Data'];
})
);
And in my home.page.ts the getAll method contain this
getAll(){
this.results = this.productService.getAll();
}
What i’m doing wrong?