Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

How to access the image from Server? #5141


User avatar
0
manojreddy created

I am calling an API from Angular UI which uploads the image to the server to a physical path like ....../xyz/abc/pqr.png. Now I want to access this image from Angular UI like the following way.

<img src="url">

url will be something like <a class="postlink" href="http://1.2.3.4:80/xyz/abc/pqr">http://1.2.3.4:80/xyz/abc/pqr</a>


2 Answer(s)
  • User Avatar
    0
    manojreddy created

    Any updates??

  • User Avatar
    0
    ismcagdas created
    Support Team

    define a variable in your ts file;

    remoteServiceBaseUrl: string = AppConsts.remoteServiceBaseUrl;
    

    and in your html file;

    <img [src]="remoteServiceBaseUrl + '/xyz/abc/pqr.png'" >