Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I reference angular-latest installed by bower?

I have installed AngularJS using bower, by calling:

$ bower install angular-latest

Now I wonder how to integrate AngularJS into my html file. Apparently, there is neither an angular[.min].js file nor an index.js file as suggested by the bower documentation.

I can't imagine that I am the first person on earth to discover this problem, but unfortunately I did not find any clues on this on Google (but perhaps I only used the wrong terms for searching).

Any idea of how to include AngularJS?

like image 596
Golo Roden Avatar asked Aug 21 '13 08:08

Golo Roden


2 Answers

Okay, I found the solution:

$ bower install angular

And everything is fine ...

like image 151
Golo Roden Avatar answered Oct 03 '22 08:10

Golo Roden


What you installed with

$ bower install angular-latest

was only the latest source code. You need to actually build AngularJS.

First, you need to install all of the following dependencies if you haven't already:

  • Git

  • Node.js

  • Java

  • Grunt

  • Bower

Second, change into the angular.js directory.

Then, install node.js dependencies and bower components:

$ npm install

$ bower install

Finally, you're ready to build your package:

$ grunt package

In the resulting build directory, you'll find

  • angular.js — The non-minified angular script
  • angular.min.js — The minified angular script
like image 23
s3-4v Avatar answered Oct 03 '22 07:10

s3-4v