Hello,
I have a REST service which returns a logo for a given company. The end-point of this service is used in ng-src of an <img> HTML element. I also have an image upload form which allows the user to upload a new logo.
I need the image to refresh after a successful upload. Currently my workaround is to append a unique timestamp to ng-src to force image reload as follows:
$scope.$apply(function () {
$scope.imageUrl = imageUrl + '?' + new Date().getTime();
});
Is there a cleaner way to accomplish image refresh without modifying ng-src or reloading the page?
Thanks,
Alec