ui-cropper
ui-cropper copied to clipboard
Problem importing
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
sorry, I don't have experience on that.
How did you import the lib ?
@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 :)
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']);