This information is read from https://thinkster.io/learn-to-build-realtime-webapps/
curl -L https://npmjs.org/install.sh | sh (Run as root -- sudo su)
- For details read https://www.npmjs.com/package/npm
curl -sL https://deb.nodesource.com/setup | sudo bash - (Run as root -- sudo su)
sudo apt-get install -y nodejs
- For details read https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
###Required tools for faster development and testing in angular
- Yoeman generator for angular js
- GruntJS for automatic build testing
- Bower for managing packages
npm install -g yo
npm install -g generator-angular
npm install -g bower grunt
(-g signifies global scope)
This will initialize a directory with Angular development environment.
mkdir myApp && cd myApp
yo angular
The command will ask for many options.
If everything is successful then you will see Gruntfile.js
, app/
, bower_components/
, bower.json
, node_modules
, test/
.
In bower.json
change name
and moduleName
. Also set the same name in app/scripts/app.js
at angular.module('{name}')
and in app/views/index.html
at ng-app="{name}"
.
- To add controllers/services
yo angular:controller/service {controller_name}
. - To add angular modules
bower install --save {module name}
. Will work only if module supports installation with bower. - To run your app in browser
grunt serve
.
For more details read this article https://thinkster.io/learn-to-build-realtime-webapps/.
Good Tut. Thanks All!