Search code examples
angularimageviewbackend

Getting image url from backend,how to show image in html in angular


findvehicleDocumentsImage(owner: string, registrationNumber: string, fileType: string): Observable<any> {
  debugger;
  return this.http.get<any>(AppConstant.FIND_VEHICLE_DOCUMENT_API+'/'+owner+'/'+registrationNumber+'/'+fileType);
}

Solution

  • get img url in ts file:

    imageUrl:string;
    

    show in html:

    <img src={{imageUrl}} alt=""/>