I want to get data json to show listpage but http.get is undefined
thanks for your help.
for(var i=0;i<this.foundRepos.length;i++){
if(!this.foundRepos[i].search.isbn){
this.foundRepos[i].se = "assets/read3.png";
}
if(this.foundRepos[i].search.isbn){
this.foundRepos[i].se = this.foundRepos[i].search.isbn;
this.api.getImage(this.foundRepos[i].se).subscribe(
data => {
this.fff = data.json();
},
err => console.error(err),
() => console.log('completed')
);
this.foundRepos[i].se = this.fff; <---this undefined
}
}
listpage.html
<ion-item text-wrap *ngFor="let item of foundRepos" (click)="goToDetails(item)">
<p>{{ item.type }}</p>
<ion-thumbnail item-left>
<img src="{{item.se}}">
</ion-thumbnail>