angular-cropperjs icon indicating copy to clipboard operation
angular-cropperjs copied to clipboard

Can't access angularCropper anywhere as defined in tutorial

Open vinayistar opened this issue 7 years ago • 1 comments

I don't know why you told that we can use it anywhere this method. In tutorial also its mentioned. But when I do so its not accessible. It should be present in constructor. With @ViewChild cant accessible. Please update the document.

this.angularCropper.cropper.getCroppedCanvas().toBlob((blob) =>{
    // blob is your base64..
});

vinayistar avatar Feb 21 '18 14:02 vinayistar

Hi, you can access it like in the docs, i use that way in many projects. The method getCroppedCanvas will only be available when you use cors option, as stated in the original cropper plugin.

matheusdavidson avatar May 04 '18 21:05 matheusdavidson