Using ng-src on img tags within ng-repeats has been successful for me in the past, but I'm facing difficulties with it this time.
After making an API call that returns some data, I tried to display each item like this:
<div ng-repeat="item in APIreturn">
<img ng-src="{{item.url}}" />
</div>
I have experimented with variations such as src="{{item.url}}"
and ng-src="item.url"
, among others. The URL seems valid and works fine with src="{{item.url}}"
outside of the ng-repeat loop.
Do you have any insights into why it behaves differently within the ng-repeat?
Current HTML Code
<table ng-repeat="user in userInformation">
<tr>
<td>UserName:</td>
<td>{{user.UserName}}</td>
</tr>
<tr>
<td>Address:</td>
<td>{{user.Address}}</td>
</tr>
<tr>
<td>Gender:</td>
<td>{{user.Gender}}</td>
</tr>
<tr>
<td>Image:</td>
<td><img ng-src"user.image" /></td>
</tr>
</table>