Seraph Cheng Seraph Cheng - 1 year ago 72
AngularJS Question

Ionic - using bower to install modules

Recently my team has started an Ionic project. For my part, I need to use

and so I execute
bower install angular-messages#1.5.3
as stated in the document. The module is downloaded successfully to the path stated in

|---<other folders>
|---<other folders>
|---<other files>
|---<other files>

I expect
is updated automatically once the new package is installed in my current project. Obviously, it is not the case.

Then I found that the
option can be used to write the dependencies of installed modules to
. I run the command
bower install --save
and it returns the results as follows.

bower install --save

However, there are no changes made to
. What is the correct way to update

At first I was planning to simply commit
to version control, so my teammates could update their projects locally by referencing the latest
. Is this the recommended approach?

Answer Source

Yo add a dependency and save in tout bower.json you need to launch bower install module_name --save not just bower install --save because this last command check your file and install or update all module on it.

If with this command you haven't some result, post your bower config file because there are maybe some problems with your configuration.

To finish If you want have a project ready to use without dependency problem yes you need to commit bower.json and package.json. However If you have some proxy or weird stuff sometimes it's important to commit .bowerrc to.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download