Reputation: 83
I have stored images to a folder serverside and to my database. I can get the image back in from the api call however It wont display in my html. Im only getting the ? box.
viewImage
viewImage() {
individuals = [];
this.viewService.viewImage(this.id).subscribe((res: any) => {
console.log(res);
this.pImages = res.patients.data;
// console.log(res.patients.data);
console.log('IMAGES');
console.log(JSON.stringify(this.pImages));
});
}
html
<ion-col *ngFor='let img of pImages'>
<img [src] = "'http://ccoulter12.lampt.eeecs.qub.ac.uk/api/'"img.Image />
Upvotes: 0
Views: 786
Reputation: 393
You can use like this
<ion-col *ngFor="let img of pImages">
<img src="http://ccoulter12.lampt.eeecs.qub.ac.uk/api/{{img.Image}}"/>
Upvotes: 1