I'm using ngx-image-cropper to load and crop images. According to the docs there is
(imageLoaded)="imageLoaded($event)"
but when I step into the typescript to debug the method 'imageLoaded()' image is undefined! It's not passing anything to the method.
In the library's code is see this
imageLoaded: EventEmitter<void>;
so it looks like the event doesn't pass anything, even though the docs say it does. Am I missing something here in terms of how I access the loaded image?
QUESTION - The docs don't show anything being passed in the html, should I pass in the '$event'?
imageLoaded(image: HTMLImageElement) {
// image is undefined
}
<image-cropper
[imageChangedEvent]="imageChangedEvent"
[maintainAspectRatio]="true"
[aspectRatio]="4/3"
format="png"
[transform]="transform"
(imageCropped)="imageCropped($event)"
(imageLoaded)="imageLoaded($event)"
(loadImageFailed)="loadImageFailed()">
</image-cropper>