-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
When you create the new image in the preLoader service you attach the 'load' and 'error' event handlers. As far as I know (and tested), these listeners need to be cleaned up otherwise you'll be left with a leak.
Something like this worked for me:
var preloaderImage = angular.element(new Image());
preloaderImage.on('load', function () {
preloaderImage.off();
successCallback();
}).on('error', function () {
preloaderImage.off();
errorCallback();
}).attr('src', url);
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels