# Ionic 2 set up plugins

**URL:** <https://forum.ionicframework.com/t/ionic-2-set-up-plugins/58027>\
**Category:** ionic-v3\
**Created:** [July 20, 2016, 6:22am UTC](https://forum.ionicframework.com/t/ionic-2-set-up-plugins/58027 "2016-07-20T06:22:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![richardmarais](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/richardmarais/32/101456_2.png) [@richardmarais](https://forum.ionicframework.com/u/richardmarais)\
**Post date:** [July 20, 2016, 6:22am UTC](https://forum.ionicframework.com/t/ionic-2-set-up-plugins/58027/1 "2016-07-20T06:22:39Z")

</div>

Hi All,

In Ionic 2, how do you set up `bower_components`? For example [ngImgCrop](https://github.com/alexk111/ngImgCrop) is installed with:

`bower install ngImgCrop`

This sets up a `bower_components` folder with the [ngImgCrop](https://github.com/alexk111/ngImgCrop) libraries.

```
app
bower_components
----------------ng-img-crop
www

```

I can find documentation on how to add the dependencies to an Ionic 1 app:

> ```
> <script src="angular.js"></script>
> <script src="ng-img-crop.js"></script>
> <link rel="stylesheet" type="text/css" href="ng-img-crop.css">
> 
> ```

and

> `var myAppModule = angular.module('MyApp', ['ngImgCrop']);`

Does anyone know how to configure this in an **Ionic 2** app please? I think I need to add an import, but how does your import access the `bower_components` as they are outside the `www` folder, or should they be copied to a `lib` folder inside the `www` folder?

> `import { NgImgCrop } from '...';`

Thanks

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [July 20, 2016, 6:44am UTC](https://forum.ionicframework.com/t/ionic-2-set-up-plugins/58027/2 "2016-07-20T06:44:15Z")

</div>

bower is busted, but that’s the least of your problems. You aren’t going to be able to use an Angular1 library in an Angular2 application.

---

<div class="post-metadata">

**Author:** ![richardmarais](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/richardmarais/32/101456_2.png) [@richardmarais](https://forum.ionicframework.com/u/richardmarais)\
**Post date:** [July 20, 2016, 6:50am UTC](https://forum.ionicframework.com/t/ionic-2-set-up-plugins/58027/3 "2016-07-20T06:50:49Z")

</div>

Thanks rapropos. You saved me going down the wrong path.

How about [cordova-plugin-crop](https://github.com/jeduan/cordova-plugin-crop)? Will that work with **Ionic 2**?

How do you do the import?

> `import { CropPlugin } from '';`

Does the `CropPlugin` have to be added to the `node_modules` folder? I installed it like this:

`$ cordova plugin add --save cordova-plugin-crop`

But am not sure where to import the installed plugin from.

---

<div class="post-metadata">

**Author:** ![richardmarais](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/richardmarais/32/101456_2.png) [@richardmarais](https://forum.ionicframework.com/u/richardmarais)\
**Post date:** [July 20, 2016, 8:34am UTC](https://forum.ionicframework.com/t/ionic-2-set-up-plugins/58027/4 "2016-07-20T08:34:47Z")

</div>

SOLVED

see [Image cropping plugin](https://forum.ionicframework.com/t/image-cropping-plugin/51206/11)
