Getting started with Angular

My friends at Equal Experts did this very nice example of how to get started with Angular.js. It involves a shopping cart and even a REST API to access the products “database”. Thanks to Anita Kadam @anitakadam11 and Pradib Hudekar @hpradip for a wonderful session on Angular.js. Here are the steps.

1. Install nvm, the Node Version Manager

The simplest way to install nvm is to download and run the script of nvm, like this:

1 curl -o- | bash

or if you prefer wget over curl:

1 wget -qO- | bash

More information:

2. Use nvm to install node.js (node and npm)

You can do it like this:

1 nvm install node

This installs node.js (node and npm) in your home directory.

3. Clone the nice ShoppingCart project from Anita Kadam

1 git clone
2 cd ShoppingCart

Note: Even if you already cloned, several of the subsequent commands require the project to be the current working directory. Therefore in any case cd ShoppingCart.

4. Use npm to install bower

1 npm install -g bower

5. Use bower to install the required libraries, including Angular.js

1 bower install

6. Use npm to install required node packages

1 npm install

7. Use npm to run the project

1 npm start

8. Open your browser and connect to http://localhost:3000

9. Enjoy

10. All commands in one sequence

1 curl -o- | bash
2 wget -qO- | bash
3 nvm install node
4 git clone
5 cd ShoppingCart
6 npm install -g bower
7 bower install
8 npm install
9 npm start
Written on July 19, 2015