Search code examples
angularngx-image-cropper

ngx-image-cropper , roundCropper = "true" not working , its showing this error - Type 'string' is not assignable to type 'boolean'


<image-cropper [imageChangedEvent]="imageChangedEvent" [maintainAspectRatio]="true" [aspectRatio]="4 / 4"
    format="jpg" (imageCropped)="imageCropped($event)" roundCropper = "true">
</image-cropper>

[screenshot attached for your reference]enter image description here

I used roundCropper = "True". But its not working and throwing the error:

Type 'string' is not assignable to type 'boolean'.

If a try to run the same code on stackblitz then its working. I have also tried it with roundCropper = true , but its giving same error.

I want to use round cropper in my ngx-image-cropper.


Solution

  • Try to surround roundCropper with [] [roundCropper] = "true"