0

I have added a dependency to the bower.json and I would like to use it in a angularJs service or controller.

When I use the library inside a web page, everything works correctly because the dependencies are loaded first. This is not the case when I am running unit tests, where dependencies results in an undefined object and my test fails.

How can I import bower-defined dependencies in an angularJs controller for testing purpose?

4

1 回答 1

1

我猜你需要执行:

bower install yourdep --save

否则不会保存在 bower.json 中。

于 2013-10-17T07:22:42.637 回答