ui-cropper icon indicating copy to clipboard operation
ui-cropper copied to clipboard

Problem importing

Open filipe-carvalho opened this issue 6 years ago • 4 comments

hello community, can someone help me ?

I am trying to use this component and in my console i am getting this error, anyone knows what is about , what can i do ?

Failed to instantiate module function MegaPixImage(srcImage) due to: Error: [$injector:unpr] Unknown provider: srcImage

I am using Webpack For compiling

Thank you in advance

filipe-carvalho avatar Nov 02 '18 15:11 filipe-carvalho

sorry, I don't have experience on that.

CrackerakiUA avatar Nov 05 '18 21:11 CrackerakiUA

How did you import the lib ?

roux1max avatar Nov 07 '18 08:11 roux1max

@CrackerakiUA Still thanks for trying to help :)

@roux1max I have a file index.js where i make all my import and module initializations and there i did use the following code:

import uiCropper from 'ui-cropper';
let customerModule = angular.module('app.customer', [uiCropper]);

Thanks you :)

filipe-carvalho avatar Nov 07 '18 09:11 filipe-carvalho

Then it is the same problem that I had, as pointed out by @CrackerakiUA ! The ui-cropper module does not export the name of the module, so you have to convert your code to :

import 'ui-cropper/compile/unminified/ui-cropper';
let customerModule = angular.module('app.customer', ['uiCropper']);

roux1max avatar Nov 07 '18 10:11 roux1max