Mourad Idrissi Mourad Idrissi - 1 year ago 189
AngularJS Question

Refresh image without changing ng-src

I have an image upload form which allows the user to upload a new profile picture. I need the image to refresh after a successful upload (with the same url in ng-src). I tried to append a random value to ng-src to force image reload using $scope.$apply but it's not working.

Answer Source

I solved partially. I just added a function that delete the img dom and add it again (i know that's not the perfect solution but it works at all)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download