Where are ionic app (www/lib) dependencies are managed?

I’ve started an ionic project using the CLI.

A package.json was created in the root folder and from what I understand this is where all the dev dependencies are managed (cli, build, gulp , tests etc …) but the app is loading it’s packages from www/lib.

Currently, if I want to add angular-resource for example to the project i’m installing using bower from the root directory and copying to the www/lib. This process does not make much sense to me and it makes it very hard to set up a new dev env so i’m probably doing something wrong.

Appreciate some guidance on this.

Thanks, Haki.

do you have a .bowerrc file in your root?

if not create one and just add this

.bowerrc file

{
      "directory": "www/lib"
}

You can use ionic-cli to manage your dependencies, like $ ionic add [component name].

And then ionic will update the bower.json, more detail in other topic.

1 Like

Thanks. The two methods suggested above did the trick.