Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49184

Unable to add ngimgcrop directive in ionic project

$
0
0

@himanshunimje wrote:

I am using ngimgcrop as a cropping tool for images taken by camera/ uploaded from gallery.

As per the installation instructions, i have added 'ngImgCrop' as a dependency in app.js file of the project.

angular.module('app', ['ngImgCrop', 'ionic', 'app.services'])

I am using the source file from lib folder in index.html after installing the directive using bower.

<script src="js/app.js"></script>
<script src="js/services.js"></script>
<script src="lib/ng-img-crop/source/js/ng-img-crop.js"></script>

But, I get the following error while doing running the app in webview (using 'ionic serve -l -c)

Uncaught ReferenceError: crop is not defined
Uncaught Error: [$injector:modulerr] Failed to instantiate module starter due to:
Failed to instantiate module ngImgCrop due to:
Module 'ngImgCrop' is not available! You either misspelled the module name or forgot to load it.

Can someone point to me if I am missing a major step / making a silly mistake while using this directive?

Kindly let me know if you need any further information.

Thanks

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49184

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>