Open koheiokazaki opened 7 years ago
when I import ng2-img-cropper, this error is happen.
/node_modules/ng2-img-cropper/src/imageCropper.ts (135,28): error TS2345: Argument of type 'RegExp' is not assignable to parameter of type 'string'.
import {ImageCropperComponent, CropperSettings} from 'ng2-img-cropper'; code is here
import {ImageCropperComponent, CropperSettings} from 'ng2-img-cropper';
let regEx = RegExp(/^(data:)([\w\/\+]+);(charset=[\w-]+|base64).*,(.*)/gi);
how to fix it??
Try this one :rose:
let regEx = new RegExp('^(data:)([\w\/\+]+);(charset=[\w-]+|base64).*,(.*)', 'gi');
https://hassantariqblog.wordpress.com/2017/05/18/angularjs-error-argument-of-type-regexp-is-not-assignable-to-parameter-of-type-string/
when I import ng2-img-cropper, this error is happen.
/node_modules/ng2-img-cropper/src/imageCropper.ts (135,28): error TS2345: Argument of type 'RegExp' is not assignable to parameter of type 'string'.
import {ImageCropperComponent, CropperSettings} from 'ng2-img-cropper';
code is herelet regEx = RegExp(/^(data:)([\w\/\+]+);(charset=[\w-]+|base64).*,(.*)/gi);
how to fix it??