I've commented on your question but I'll offer my suggestion as a solution after looking at the AngularJS documentation. The ng-src
directive will correctly set the src
attribute of img
. This directive can contain Angular expressions and these can call functions contained in your controller and reachable in the current scope. Hence instead of:
<img ng-src="getThumbnail({{ item.Id }})" />
Try this:
<img ng-src="{{ getThumbnail(item.Id) }}" />
In the former declaration, the function isn't available to the Angular scope, but it is in the latter. (If I am not mistaken, as I haven't tried the code myself).
Make sure the getThumbnail
function is in a controller that is reachable to the current scope.