2

How to get api url when retrieve image from database

            <table class="table">
              <tr>
                <th>Id</th>
                <th>Image</th>

              </tr>
              <tr *ngFor="let image of images">

                <td>{{image.id}}</td>
                <td><img src="{{image.image}}"/></td>
              </tr>
            </table>        

1 Answer 1

1

You can write like this

           <table class="table">
          <tr>
            <th>Id</th>
            <th>Image</th>

          </tr>
          <tr *ngFor="let image of images">

            <td>{{image.id}}</td>
            <td><img src="mypath/{{image.image}}"/></td>
          </tr>
        </table>

Thanks.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.