Reputation:
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>
Upvotes: 2
Views: 439
Reputation: 2663
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.
Upvotes: 1