This is the code snippest in my service.ts(this.http is a HttpClient obj)
importAllImages (): Observable<Image[]> {
return this.http.get<Image[]>('http://localhost:8080/fileservice/allimages');
}
And this is the code snippest that calls the service shown above(filemanager is an obj of the service above and images is an array of image obj):
this.fileManager.importAllImages().subscribe(imagesp => this.images = imagesp);
console.log(this.images.length);
And my html:
<div *ngFor="let image of images">
<p>{{image?.imageName}}</p>
Then i open http://localhost:4200 but i can't get any image names in it.
PS:I have successfully start my backend SpringBoot Application and i can see my JSON data when i open http://localhost:8080 like this: JSON Data image Can someone help me with this?