I want to use Image.onload = function () {} in angular
my code
loadImage(path) {
this.loadedImage = new Image();
this.loadedImage.crossOrigin = "Anonymous";
this.loadedImage.src = path;
this.loadedImage.onload = function () {
this._PreviewHelper.changeModelTexture(this.model, this.loadedImage);
}
}
Is there a way to use this event on angular.
Any help would be greatly appreciated.
.onload = () => {?didn't work? Are you getting any errors?