Skip to content

angular installation

rhodges edited this page Nov 24, 2014 · 2 revisions

#Installing Angular

These notes were compiled by the Software Development team at Ecotrust. Thanks to Matt Perry for putting most of this together.

##Javascript build tools installation

RDH - I needed to apt install ruby-dev and gem install compass (sudo both)

  • sudo add-apt-repository ppa:chris-lea/node.js
  • sudo apt-get update
  • sudo apt-get install nodejs
  • sudo npm install npm -g
  • sudo npm remove generator-karma -g
  • sudo npm install -g yo grunt-cli bower
  • sudo npm install -g generator-angular

##Creating a new project

  • cd /src/newproject
  • yo angular # follow interactive prompts

RDH - This gave me several errors when Yeoman tried to run bower install and npm install - it encourages you to do this yourself, and seems to work (mostly) fine after editing .bowerrc

vi .bowerrc

`{

  "directory": "app/components",

  "json": "bower.json" // Add this line

}`

bower install angular-bootstrap --save

##Serving and building the site with grunt

grunt serve grunt build # creates the dist dir

Clone this wiki locally