I can view my image from direct URL apply in src tag but if I tried load as dynamically it's throwing error. I tried [src]="img.ImagePath" this method also I'm getting same response
HTML
<div *ngFor="let img of imageData">
<img [alt]="img.Name" src="{{img.ImagePath}}}">
</div>
component.ts
getImages() {
this.image.getImage().subscribe(res => {
this.imageData = res;
console.log(res);
});
}
service.ts
getImage() {
return this.http.get('https://localhost:44349/api/second?id=2');
}
My API run in https://localhost:44349/ and my angular application is running in http://localhost:4200/