SlideShare a Scribd company logo
AngularJS Project Setup
A Step-by-Step Guide
Presented by: Gourav Ajmani
Technical Lead, RapidValue Solutions
AngularJS Project Setup Step By Step Guide
© RapidValue Solutions 2
Contents
Introduction.....................................................................................................................................................................3
Install Pre-requisites .........................................................................................................................................................3
Install the Yeoman Toolset ................................................................................................................................................5
Install a Yeoman Generator ..............................................................................................................................................5
AngularJS-RequireJS Generator .........................................................................................................................................6
Start Preparing to Create Project ......................................................................................................................................6
Configure your Generator.................................................................................................................................................6
Review the Yeoman-generated Application.........................................................................................................................8
Run the Application in the Browser ..................................................................................................................................10
Making the Application Perfect and De-coupled ................................................................................................................12
Conclusion .....................................................................................................................................................................14
AngularJS Project Setup Step By Step Guide
© RapidValue Solutions 3
Introduction
AngularJS is a popular JavaScript framework. It is intended to make the implementation of RIA
(Rich Internet Applications) easier and convenient. AngularJS is created and maintained by
Google. It is relatively, a new JavaScript framework, which is designed to make the front-end
development as simple as possible. AngularJS is a useful tool for standardizing the web
application structure and it provides a future template to ensure that the client-side
applications are developed much effectively.
I have been working on AngularJS for a while now, and have read many tutorials and blogs on it.
I could never find any article which gives a clear, concise and step-by-step guide to create the
project structure and execute the project. So, I have written this document which will help you
to create the Project structure and then execute it in a simple manner.
Install Pre-requisites
Before installing Yeoman, you will need the following:
 Node.js v0.10.x+
o You can download it from here.
o Set the path to NodeJS in environment variable, in this example: NodeJS is
installed in “C:Program Files (x86)”. So, the path looks like :
 npm (which comes bundled with Node) v2.1.0+
AngularJS Project Setup Step By Step Guide
© RapidValue Solutions 4
 GIT
o You can download it from here.
o Set the path to GIT in environment variable. In this case, GTI got installed in
“C:Program Files”. So, the path looks like:
 Check if you have NodeJS and npm installed by typing (in command prompt):
 By default, npm comes along with NodeJS, but you might need to update it with the
latest version of it. You can update it using the command (in command prompt):
Check if you have GIT installed by typing (in command prompt):
AngularJS Project Setup Step By Step Guide
© RapidValue Solutions 5
Install the Yeoman Toolset
 Once you have NodeJS installed, install the Yeoman Toolset, by typing (in command
prompt):
It should execute/install some commands and you should be back to your command
prompt without any error.
 You should confirm whether all the required installation is completed , by typing (in
command prompt):
The above command should give you the three different versions of Yo, Bower, and
Grunt respectively.
Install Yeoman Generator
You will need to spend time setting up the code for your web application, creating folder
structure, defining and installing dependencies in traditional web development workflow. But,
if you have Yeoman, it makes the task easier. So, install it.
 Install a generator for AngularJS projects.
o You can install Yeoman generators, using the npm command.
o Install generator-angular by typing (in command prompt):
This should install NodeJS packages required for the generator.
AngularJS Project Setup Step By Step Guide
© RapidValue Solutions 6
AngularJS-RequireJS Generator
You should install generator for AngularJS-RequireJS and Karma-RequireJS.
 Install generator-angular-require and generator-karma-require.
o You can install generator for AngularJS-RequireJS & Karma-RequireJS by typing
(in command prompt)
It should execute/install some commands and you will get a command prompt without
any error.
Start Preparing to Create Project
 Make a new directory (name of your application) and navigate into it.
o A directory is created with the name “SampleAngularJsProject”, in local drive
“G:”, and navigated there using command prompt.
o Here, you need to execute Yo for angular-require along with appName.
(SampleAngularJsProject) by typing (in command prompt).
Type Y or n , depends on your choice, if you would like to share the usage
statistic of the tool. It is preferable not to do that, so n is typed.
AngularJS Project Setup Step By Step Guide
© RapidValue Solutions 7
Configure Your Generator
AngularJS generator provides an option to customize the application with the commonly
developed libraries, so that it can speed up the development environment.
Here, it gives an option to use Sass (with Compass) and include Twitter Bootstrap. In this,
Bootstrap is included and Sass is avoided. Enter n then y , respectively, to these options.
Generator will prompt to select the Angular Modules that you would like to include in the
application.
AngularJS Project Setup Step By Step Guide
© RapidValue Solutions 8
You can check/un-check the modules using UP / DOWN arrow key and use the SPACE bar to
select it.
Let’s go ahead with the default selected one (until you are keen to include the other two
modules)). Press Enter to see what Yeoman has in store for you.
It should execute/install some commands and you should be back to your command prompt
without any error.
Review the Yeoman-generated Application
Open up your “SampleAngularJsProject” directory to take a look at what was actually
scaffolded. It'll look like this:
AngularJS Project Setup Step By Step Guide
© RapidValue Solutions 9
AngularJS Project Setup Step By Step Guide
© RapidValue Solutions 10
In “SampleAngularJsProject”, we have:
 app: a parent directory for our application
 index.html: the base html file for our Angular application
 404.html, favicon.ico, and robots.txt: commonly used web files so you don’t have to
create them yourself
 scripts: JS files
 app.js: Entry point to Angular application code
 controllers: ngular controllers
 styles: CSS files
 views: directory for Angular templates
 bower_components, bower.json: our JavaScript/web dependencies, installed by Bower
 Gruntfile.js, package.json, and node_modules: configuration and dependencies
required by our Grunt tasks
 test: a scaffolded out test runner and the unit tests for the project, including boilerplate
tests for our controllers
Run the Application in the Browser
To run the application, you do not have to worry about setting up the web server locally. All of
it is considered by Yeoman.
 Start the server
o To start the server, run a grunt task to create local, node based HTTP server on
localhost:9090 by typing ( In command prompt):
AngularJS Project Setup Step By Step Guide
© RapidValue Solutions 11
And, your web browser should open up, automatically, and it should launch the newly created
AngularJS web application.
 Auto-reload the changes in your files
o Yeoman has generated an application for you in a way, so that if you make any
changes in any of your file it will, automatically, force a browser refresh.
o This is called live reloading.
o Live reload has been configured in the gruntfile.js and it keeps a watch on certain
set of files and it, automatically, reloads them if it detects any changes.
AngularJS Project Setup Step By Step Guide
© RapidValue Solutions 12
Making the Application Perfect and De-coupled
Yeoman has made it easy to create the Angularjs project structure and has given us an outline
and idea of how the structure should look.
However, there are few suggestions, which you might want to consider, which will make your
application more decoupled, maintainable and neat.
If you notice the project structure above, you will see “script” folder which has app.js and a
nested folder named “controllers”, which will store all the JS files of the application. There is
another folder named “views”, which is used to store all the html files of the application.
 This is the place where the changes need to be incorporated :
o Instead of saving all the application JS files in “controllers”, it is recommended to
create nested folder named “modules” under “scripts” and eliminate
“controllers” folder.
o Coming to “modules” folder, you should create the nested folder under
“modules”, depending on the Modules you have for the application. Login
module, for example.
o So, you create a folder named “login” under “modules”. In “login” folder, the
JS, HTML & CSS files are saved, corresponding to Login module.
By doing so, you can eliminate “views” folder as well, because, the HTML’s are
there in the corresponding module folder.
So, the updated code structure should look like.
AngularJS Project Setup Step By Step Guide
© RapidValue Solutions 13
If you notice, there is no “controllers” & “views” folder any more but couple of other
new folders, “modules”, “login” & “accounts”, each of which have their own JS, HTML
& CSS files.
AngularJS Project Setup Step By Step Guide
© RapidValue Solutions 14
Conclusion
AngularJS is a great option which enables you to extend HTML vocabulary for your application.
The environment, thus obtained, is expressive, easily readable, and fast to develop. AngularJS
is an essential toolset for building the framework which is most suited to application
development. It is fully extensible and works efficiently. You are able to modify each and every
feature or replace them to suit the needs and requirements of the development workflow.
AngularJS has been dominating JavaScript framework and the popularity, that it has gained,
reveals that the dominance will prevail in the future.
This document addresses queries on AngularJS and hope the information is useful for you.
Please feel free to post your queries, feedback, comments and suggestions at
contactus@rapidvaluesolutions.com
Reference
 AngulurJS - http://www.w3schools.com/angular/angular_intro.asp
 Yeoman toolset - https://github.com/yeoman/yo
 Yeoman Generator - http://yeoman.io/codelab/install-generators.html
 Controllers – http://www.w3schools.com/angular/angular_controllers.asp
 Modules – https://docs.angularjs.org/api/ng/function/angular.module
 Scripts - https://docs.angularjs.org/api/ng/directive/script
 HTML - http://www.w3schools.com/html/
 CSS - http://www.w3schools.com/css/
 NoodleJS - http://damodaran.github.io/Books/Nodejs/noodlejs.html
 Bower- https://github.com/angular/bower-angular
 Grunt - https://www.npmjs.com/package/grunt-angular-builder
 Node Js- http://www.tutorialspoint.com/nodejs/
 GIT – https://en.wikipedia.org/wiki/GitHub
 Npm - https://github.com/npm/npm
AngularJS Project Setup Step By Step Guide
© RapidValue Solutions 15
About RapidValue
RapidValue is a leading provider of end-to-end mobility, omni-channel and cloud solutions to enterprises
worldwide. Armed with a large team of experts in consulting, UX design and application engineering,
along with experience delivering global projects, we offer a range of services across various industry
verticals. RapidValue delivers its services to the world’s top brands and Fortune 1000 companies, and
has offices in the United States and India.
Disclaimer:
This document contains information that is confidential and proprietary to RapidValue Solutions Inc. No part of it may be used,
circulated, quoted, or reproduced for distribution outside RapidValue. If you are not the intended recipient of this report, you are
hereby notified that the use, circulation, quoting, or reproducing of this report is strictly prohibited and may be unlawful.
© RapidValue Solutions
www.rapidvaluesolutions.com/blogwww.rapidvaluesolutions.com
+1 877.643.1850 contactus@rapidvaluesolutions.com

More Related Content

What's hot

AngularJS Basics and Best Practices - CC FE &UX
AngularJS Basics and Best Practices - CC FE &UXAngularJS Basics and Best Practices - CC FE &UX
AngularJS Basics and Best Practices - CC FE &UX
JWORKS powered by Ordina
 
AngularJS for designers and developers
AngularJS for designers and developersAngularJS for designers and developers
AngularJS for designers and developersKai Koenig
 
Introduction to Unit Tests and TDD
Introduction to Unit Tests and TDDIntroduction to Unit Tests and TDD
Introduction to Unit Tests and TDD
Betclic Everest Group Tech Team
 
AngularJS introduction
AngularJS introductionAngularJS introduction
AngularJS introduction
Tania Gonzales
 
AngularJS Basic Training
AngularJS Basic TrainingAngularJS Basic Training
AngularJS Basic Training
Cornel Stefanache
 
Angular js
Angular jsAngular js
Angular js
Dinusha Nandika
 
AngularJs
AngularJsAngularJs
AngularJs
syam kumar kk
 
AngularJS best-practices
AngularJS best-practicesAngularJS best-practices
AngularJS best-practices
Henry Tao
 
Why angular js Framework
Why angular js Framework Why angular js Framework
Why angular js Framework
Sakthi Bro
 
Practical AngularJS
Practical AngularJSPractical AngularJS
Practical AngularJS
Wei Ru
 
AngularJS Best Practices
AngularJS Best PracticesAngularJS Best Practices
AngularJS Best Practices
Narek Mamikonyan
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
Jussi Pohjolainen
 
Angular js
Angular jsAngular js
Angular js
Knoldus Inc.
 
Angular js
Angular jsAngular js
Angular js
Manav Prasad
 
Understanding angular js
Understanding angular jsUnderstanding angular js
Understanding angular js
Aayush Shrestha
 
Angular from Scratch
Angular from ScratchAngular from Scratch
Angular from Scratch
Christian Lilley
 
Angular js architecture (v1.4.8)
Angular js architecture (v1.4.8)Angular js architecture (v1.4.8)
Angular js architecture (v1.4.8)
Gabi Costel Lapusneanu
 
AngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get startedAngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get started
Stéphane Bégaudeau
 
Front end development with Angular JS
Front end development with Angular JSFront end development with Angular JS
Front end development with Angular JS
Bipin
 

What's hot (20)

AngularJS Basics and Best Practices - CC FE &UX
AngularJS Basics and Best Practices - CC FE &UXAngularJS Basics and Best Practices - CC FE &UX
AngularJS Basics and Best Practices - CC FE &UX
 
AngularJS for designers and developers
AngularJS for designers and developersAngularJS for designers and developers
AngularJS for designers and developers
 
Introduction to Unit Tests and TDD
Introduction to Unit Tests and TDDIntroduction to Unit Tests and TDD
Introduction to Unit Tests and TDD
 
AngularJS introduction
AngularJS introductionAngularJS introduction
AngularJS introduction
 
Introduction to Angularjs
Introduction to AngularjsIntroduction to Angularjs
Introduction to Angularjs
 
AngularJS Basic Training
AngularJS Basic TrainingAngularJS Basic Training
AngularJS Basic Training
 
Angular js
Angular jsAngular js
Angular js
 
AngularJs
AngularJsAngularJs
AngularJs
 
AngularJS best-practices
AngularJS best-practicesAngularJS best-practices
AngularJS best-practices
 
Why angular js Framework
Why angular js Framework Why angular js Framework
Why angular js Framework
 
Practical AngularJS
Practical AngularJSPractical AngularJS
Practical AngularJS
 
AngularJS Best Practices
AngularJS Best PracticesAngularJS Best Practices
AngularJS Best Practices
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
Angular js
Angular jsAngular js
Angular js
 
Angular js
Angular jsAngular js
Angular js
 
Understanding angular js
Understanding angular jsUnderstanding angular js
Understanding angular js
 
Angular from Scratch
Angular from ScratchAngular from Scratch
Angular from Scratch
 
Angular js architecture (v1.4.8)
Angular js architecture (v1.4.8)Angular js architecture (v1.4.8)
Angular js architecture (v1.4.8)
 
AngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get startedAngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get started
 
Front end development with Angular JS
Front end development with Angular JSFront end development with Angular JS
Front end development with Angular JS
 

Viewers also liked

AngularJS Architecture
AngularJS ArchitectureAngularJS Architecture
AngularJS Architecture
Eyal Vardi
 
AngularJS Basics with Example
AngularJS Basics with ExampleAngularJS Basics with Example
AngularJS Basics with Example
Sergey Bolshchikov
 
Single Page Application (SPA) using AngularJS
Single Page Application (SPA) using AngularJSSingle Page Application (SPA) using AngularJS
Single Page Application (SPA) using AngularJS
M R Rony
 
29 Essential AngularJS Interview Questions
29 Essential AngularJS Interview Questions29 Essential AngularJS Interview Questions
29 Essential AngularJS Interview Questions
Arc & Codementor
 
Overview about AngularJS Framework
Overview about AngularJS Framework Overview about AngularJS Framework
Overview about AngularJS Framework
Camilo Lopes
 
Google cloud endpoints
Google cloud endpointsGoogle cloud endpoints
Google cloud endpoints
Dimitar Danailov
 
Google Cloud Endpoints: Building Third-Party APIs on Google AppEngine
Google Cloud Endpoints: Building Third-Party APIs on Google AppEngineGoogle Cloud Endpoints: Building Third-Party APIs on Google AppEngine
Google Cloud Endpoints: Building Third-Party APIs on Google AppEngine
Roman Kirillov
 
Building ColdFusion And AngularJS Applications
Building ColdFusion And AngularJS ApplicationsBuilding ColdFusion And AngularJS Applications
Building ColdFusion And AngularJS Applications
ColdFusionConference
 
VMworld Europe 2014: Preview the Latest Release from AirWatch
VMworld Europe 2014: Preview the Latest Release from AirWatchVMworld Europe 2014: Preview the Latest Release from AirWatch
VMworld Europe 2014: Preview the Latest Release from AirWatch
VMworld
 
Building single page applications
Building single page applicationsBuilding single page applications
Building single page applications
SC5.io
 
Introduction To Single Page Application
Introduction To Single Page ApplicationIntroduction To Single Page Application
Introduction To Single Page ApplicationKMS Technology
 
Enterprise Mobile Device Management (MDM)
Enterprise Mobile Device Management (MDM)Enterprise Mobile Device Management (MDM)
Enterprise Mobile Device Management (MDM)
SPEC INDIA
 
MDM- Mobile Device Management
MDM- Mobile Device ManagementMDM- Mobile Device Management
MDM- Mobile Device Management
Bala G
 
AngularJS - Présentation (french)
AngularJS - Présentation (french)AngularJS - Présentation (french)
AngularJS - Présentation (french)
Yacine Rezgui
 
Allegro PCB教學
Allegro PCB教學Allegro PCB教學
Allegro PCB教學
Michael Lee
 
Mobile device management presentation
Mobile device management presentationMobile device management presentation
Mobile device management presentation
ratneshsinghparihar
 
blood, blood product, blood transfusion
blood, blood product, blood transfusionblood, blood product, blood transfusion
blood, blood product, blood transfusion
Hidayat Shariff
 
DepED Master Teacher I and II
DepED Master Teacher I and IIDepED Master Teacher I and II
DepED Master Teacher I and II
joems_angel2000
 
The Main and Subordinate Clause
The Main and Subordinate ClauseThe Main and Subordinate Clause
The Main and Subordinate ClauseRachel Jones
 

Viewers also liked (19)

AngularJS Architecture
AngularJS ArchitectureAngularJS Architecture
AngularJS Architecture
 
AngularJS Basics with Example
AngularJS Basics with ExampleAngularJS Basics with Example
AngularJS Basics with Example
 
Single Page Application (SPA) using AngularJS
Single Page Application (SPA) using AngularJSSingle Page Application (SPA) using AngularJS
Single Page Application (SPA) using AngularJS
 
29 Essential AngularJS Interview Questions
29 Essential AngularJS Interview Questions29 Essential AngularJS Interview Questions
29 Essential AngularJS Interview Questions
 
Overview about AngularJS Framework
Overview about AngularJS Framework Overview about AngularJS Framework
Overview about AngularJS Framework
 
Google cloud endpoints
Google cloud endpointsGoogle cloud endpoints
Google cloud endpoints
 
Google Cloud Endpoints: Building Third-Party APIs on Google AppEngine
Google Cloud Endpoints: Building Third-Party APIs on Google AppEngineGoogle Cloud Endpoints: Building Third-Party APIs on Google AppEngine
Google Cloud Endpoints: Building Third-Party APIs on Google AppEngine
 
Building ColdFusion And AngularJS Applications
Building ColdFusion And AngularJS ApplicationsBuilding ColdFusion And AngularJS Applications
Building ColdFusion And AngularJS Applications
 
VMworld Europe 2014: Preview the Latest Release from AirWatch
VMworld Europe 2014: Preview the Latest Release from AirWatchVMworld Europe 2014: Preview the Latest Release from AirWatch
VMworld Europe 2014: Preview the Latest Release from AirWatch
 
Building single page applications
Building single page applicationsBuilding single page applications
Building single page applications
 
Introduction To Single Page Application
Introduction To Single Page ApplicationIntroduction To Single Page Application
Introduction To Single Page Application
 
Enterprise Mobile Device Management (MDM)
Enterprise Mobile Device Management (MDM)Enterprise Mobile Device Management (MDM)
Enterprise Mobile Device Management (MDM)
 
MDM- Mobile Device Management
MDM- Mobile Device ManagementMDM- Mobile Device Management
MDM- Mobile Device Management
 
AngularJS - Présentation (french)
AngularJS - Présentation (french)AngularJS - Présentation (french)
AngularJS - Présentation (french)
 
Allegro PCB教學
Allegro PCB教學Allegro PCB教學
Allegro PCB教學
 
Mobile device management presentation
Mobile device management presentationMobile device management presentation
Mobile device management presentation
 
blood, blood product, blood transfusion
blood, blood product, blood transfusionblood, blood product, blood transfusion
blood, blood product, blood transfusion
 
DepED Master Teacher I and II
DepED Master Teacher I and IIDepED Master Teacher I and II
DepED Master Teacher I and II
 
The Main and Subordinate Clause
The Main and Subordinate ClauseThe Main and Subordinate Clause
The Main and Subordinate Clause
 

Similar to AngularJS Project Setup step-by- step guide - RapidValue Solutions

Web worker in your angular application
Web worker in your angular applicationWeb worker in your angular application
Web worker in your angular application
Suresh Patidar
 
Django simplified : by weever mbakaya
Django simplified : by weever mbakayaDjango simplified : by weever mbakaya
Django simplified : by weever mbakaya
Mbakaya Kwatukha
 
ANGULAR JS LAB MANUAL(final) vtu2021 sch
ANGULAR JS LAB MANUAL(final) vtu2021 schANGULAR JS LAB MANUAL(final) vtu2021 sch
ANGULAR JS LAB MANUAL(final) vtu2021 sch
kannikadg
 
Getting started with appium
Getting started with appiumGetting started with appium
Getting started with appium
Pratik Patel
 
Protractor Testing Automation Tool Framework / Jasmine Reporters
Protractor Testing Automation Tool Framework / Jasmine ReportersProtractor Testing Automation Tool Framework / Jasmine Reporters
Protractor Testing Automation Tool Framework / Jasmine Reporters
Haitham Refaat
 
An Overview of Angular 4
An Overview of Angular 4 An Overview of Angular 4
Angular kickstart slideshare
Angular kickstart   slideshareAngular kickstart   slideshare
Angular kickstart slideshare
SaleemMalik52
 
Angularjs 131211063348-phpapp01
Angularjs 131211063348-phpapp01Angularjs 131211063348-phpapp01
Angularjs 131211063348-phpapp01
Arunangsu Sahu
 
React django
React djangoReact django
React django
Heber Silva
 
angularjs_tutorial.docx
angularjs_tutorial.docxangularjs_tutorial.docx
angularjs_tutorial.docx
telegramvip
 
Angular
AngularAngular
AOT(Ahead Of Time)
AOT(Ahead Of Time)AOT(Ahead Of Time)
AOT(Ahead Of Time)
Questpond
 
AngularJS with RequireJS
AngularJS with RequireJSAngularJS with RequireJS
AngularJS with RequireJS
Johannes Weber
 
A Comprehensive Guide to Conducting Test Automation Using Appium & Cucumber o...
A Comprehensive Guide to Conducting Test Automation Using Appium & Cucumber o...A Comprehensive Guide to Conducting Test Automation Using Appium & Cucumber o...
A Comprehensive Guide to Conducting Test Automation Using Appium & Cucumber o...
flufftailshop
 
How create react app help in creating a new react applications
How create react app help in creating a new react applications How create react app help in creating a new react applications
How create react app help in creating a new react applications
Concetto Labs
 
Angular - Chapter 1 - Introduction
 Angular - Chapter 1 - Introduction Angular - Chapter 1 - Introduction
Angular - Chapter 1 - Introduction
WebStackAcademy
 
Adding User Management to Node.js
Adding User Management to Node.jsAdding User Management to Node.js
Adding User Management to Node.js
Dev_Events
 
Progressive Web Application by Citytech
Progressive Web Application by CitytechProgressive Web Application by Citytech
Progressive Web Application by Citytech
Ritwik Das
 
Learn Django Tips, Tricks & Techniques for Developers
Learn Django Tips, Tricks & Techniques for DevelopersLearn Django Tips, Tricks & Techniques for Developers
Learn Django Tips, Tricks & Techniques for Developers
Mars Devs
 

Similar to AngularJS Project Setup step-by- step guide - RapidValue Solutions (20)

Web worker in your angular application
Web worker in your angular applicationWeb worker in your angular application
Web worker in your angular application
 
Django simplified : by weever mbakaya
Django simplified : by weever mbakayaDjango simplified : by weever mbakaya
Django simplified : by weever mbakaya
 
ANGULAR JS LAB MANUAL(final) vtu2021 sch
ANGULAR JS LAB MANUAL(final) vtu2021 schANGULAR JS LAB MANUAL(final) vtu2021 sch
ANGULAR JS LAB MANUAL(final) vtu2021 sch
 
Getting started with appium
Getting started with appiumGetting started with appium
Getting started with appium
 
Protractor Testing Automation Tool Framework / Jasmine Reporters
Protractor Testing Automation Tool Framework / Jasmine ReportersProtractor Testing Automation Tool Framework / Jasmine Reporters
Protractor Testing Automation Tool Framework / Jasmine Reporters
 
An Overview of Angular 4
An Overview of Angular 4 An Overview of Angular 4
An Overview of Angular 4
 
Angular kickstart slideshare
Angular kickstart   slideshareAngular kickstart   slideshare
Angular kickstart slideshare
 
Angularjs 131211063348-phpapp01
Angularjs 131211063348-phpapp01Angularjs 131211063348-phpapp01
Angularjs 131211063348-phpapp01
 
AngularJs
AngularJsAngularJs
AngularJs
 
React django
React djangoReact django
React django
 
angularjs_tutorial.docx
angularjs_tutorial.docxangularjs_tutorial.docx
angularjs_tutorial.docx
 
Angular
AngularAngular
Angular
 
AOT(Ahead Of Time)
AOT(Ahead Of Time)AOT(Ahead Of Time)
AOT(Ahead Of Time)
 
AngularJS with RequireJS
AngularJS with RequireJSAngularJS with RequireJS
AngularJS with RequireJS
 
A Comprehensive Guide to Conducting Test Automation Using Appium & Cucumber o...
A Comprehensive Guide to Conducting Test Automation Using Appium & Cucumber o...A Comprehensive Guide to Conducting Test Automation Using Appium & Cucumber o...
A Comprehensive Guide to Conducting Test Automation Using Appium & Cucumber o...
 
How create react app help in creating a new react applications
How create react app help in creating a new react applications How create react app help in creating a new react applications
How create react app help in creating a new react applications
 
Angular - Chapter 1 - Introduction
 Angular - Chapter 1 - Introduction Angular - Chapter 1 - Introduction
Angular - Chapter 1 - Introduction
 
Adding User Management to Node.js
Adding User Management to Node.jsAdding User Management to Node.js
Adding User Management to Node.js
 
Progressive Web Application by Citytech
Progressive Web Application by CitytechProgressive Web Application by Citytech
Progressive Web Application by Citytech
 
Learn Django Tips, Tricks & Techniques for Developers
Learn Django Tips, Tricks & Techniques for DevelopersLearn Django Tips, Tricks & Techniques for Developers
Learn Django Tips, Tricks & Techniques for Developers
 

More from RapidValue

How to Build a Micro-Application using Single-Spa
How to Build a Micro-Application using Single-SpaHow to Build a Micro-Application using Single-Spa
How to Build a Micro-Application using Single-Spa
RapidValue
 
Play with Jenkins Pipeline
Play with Jenkins PipelinePlay with Jenkins Pipeline
Play with Jenkins Pipeline
RapidValue
 
Accessibility Testing using Axe
Accessibility Testing using AxeAccessibility Testing using Axe
Accessibility Testing using Axe
RapidValue
 
Guide to Generate Extent Report in Kotlin
Guide to Generate Extent Report in KotlinGuide to Generate Extent Report in Kotlin
Guide to Generate Extent Report in Kotlin
RapidValue
 
Automation in Digital Cloud Labs
Automation in Digital Cloud LabsAutomation in Digital Cloud Labs
Automation in Digital Cloud Labs
RapidValue
 
Microservices Architecture - Top Trends & Key Business Benefits
Microservices Architecture -  Top Trends & Key Business BenefitsMicroservices Architecture -  Top Trends & Key Business Benefits
Microservices Architecture - Top Trends & Key Business Benefits
RapidValue
 
Uploading Data Using Oracle Web ADI
Uploading Data Using Oracle Web ADIUploading Data Using Oracle Web ADI
Uploading Data Using Oracle Web ADI
RapidValue
 
Appium Automation with Kotlin
Appium Automation with KotlinAppium Automation with Kotlin
Appium Automation with Kotlin
RapidValue
 
Build UI of the Future with React 360
Build UI of the Future with React 360Build UI of the Future with React 360
Build UI of the Future with React 360
RapidValue
 
Python Google Cloud Function with CORS
Python Google Cloud Function with CORSPython Google Cloud Function with CORS
Python Google Cloud Function with CORS
RapidValue
 
Real-time Automation Result in Slack Channel
Real-time Automation Result in Slack ChannelReal-time Automation Result in Slack Channel
Real-time Automation Result in Slack Channel
RapidValue
 
Automation Testing with KATALON Cucumber BDD
Automation Testing with KATALON Cucumber BDDAutomation Testing with KATALON Cucumber BDD
Automation Testing with KATALON Cucumber BDD
RapidValue
 
How to Implement Micro Frontend Architecture using Angular Framework
How to Implement Micro Frontend Architecture using Angular FrameworkHow to Implement Micro Frontend Architecture using Angular Framework
How to Implement Micro Frontend Architecture using Angular Framework
RapidValue
 
Video Recording of Selenium Automation Flows
Video Recording of Selenium Automation FlowsVideo Recording of Selenium Automation Flows
Video Recording of Selenium Automation Flows
RapidValue
 
JMeter JMX Script Creation via BlazeMeter
JMeter JMX Script Creation via BlazeMeterJMeter JMX Script Creation via BlazeMeter
JMeter JMX Script Creation via BlazeMeter
RapidValue
 
Migration to Extent Report 4
Migration to Extent Report 4Migration to Extent Report 4
Migration to Extent Report 4
RapidValue
 
The Definitive Guide to Implementing Shift Left Testing in QA
The Definitive Guide to Implementing Shift Left Testing in QAThe Definitive Guide to Implementing Shift Left Testing in QA
The Definitive Guide to Implementing Shift Left Testing in QA
RapidValue
 
Data Seeding via Parameterized API Requests
Data Seeding via Parameterized API RequestsData Seeding via Parameterized API Requests
Data Seeding via Parameterized API Requests
RapidValue
 
Test Case Creation in Katalon Studio
Test Case Creation in Katalon StudioTest Case Creation in Katalon Studio
Test Case Creation in Katalon Studio
RapidValue
 
How to Perform Memory Leak Test Using Valgrind
How to Perform Memory Leak Test Using ValgrindHow to Perform Memory Leak Test Using Valgrind
How to Perform Memory Leak Test Using Valgrind
RapidValue
 

More from RapidValue (20)

How to Build a Micro-Application using Single-Spa
How to Build a Micro-Application using Single-SpaHow to Build a Micro-Application using Single-Spa
How to Build a Micro-Application using Single-Spa
 
Play with Jenkins Pipeline
Play with Jenkins PipelinePlay with Jenkins Pipeline
Play with Jenkins Pipeline
 
Accessibility Testing using Axe
Accessibility Testing using AxeAccessibility Testing using Axe
Accessibility Testing using Axe
 
Guide to Generate Extent Report in Kotlin
Guide to Generate Extent Report in KotlinGuide to Generate Extent Report in Kotlin
Guide to Generate Extent Report in Kotlin
 
Automation in Digital Cloud Labs
Automation in Digital Cloud LabsAutomation in Digital Cloud Labs
Automation in Digital Cloud Labs
 
Microservices Architecture - Top Trends & Key Business Benefits
Microservices Architecture -  Top Trends & Key Business BenefitsMicroservices Architecture -  Top Trends & Key Business Benefits
Microservices Architecture - Top Trends & Key Business Benefits
 
Uploading Data Using Oracle Web ADI
Uploading Data Using Oracle Web ADIUploading Data Using Oracle Web ADI
Uploading Data Using Oracle Web ADI
 
Appium Automation with Kotlin
Appium Automation with KotlinAppium Automation with Kotlin
Appium Automation with Kotlin
 
Build UI of the Future with React 360
Build UI of the Future with React 360Build UI of the Future with React 360
Build UI of the Future with React 360
 
Python Google Cloud Function with CORS
Python Google Cloud Function with CORSPython Google Cloud Function with CORS
Python Google Cloud Function with CORS
 
Real-time Automation Result in Slack Channel
Real-time Automation Result in Slack ChannelReal-time Automation Result in Slack Channel
Real-time Automation Result in Slack Channel
 
Automation Testing with KATALON Cucumber BDD
Automation Testing with KATALON Cucumber BDDAutomation Testing with KATALON Cucumber BDD
Automation Testing with KATALON Cucumber BDD
 
How to Implement Micro Frontend Architecture using Angular Framework
How to Implement Micro Frontend Architecture using Angular FrameworkHow to Implement Micro Frontend Architecture using Angular Framework
How to Implement Micro Frontend Architecture using Angular Framework
 
Video Recording of Selenium Automation Flows
Video Recording of Selenium Automation FlowsVideo Recording of Selenium Automation Flows
Video Recording of Selenium Automation Flows
 
JMeter JMX Script Creation via BlazeMeter
JMeter JMX Script Creation via BlazeMeterJMeter JMX Script Creation via BlazeMeter
JMeter JMX Script Creation via BlazeMeter
 
Migration to Extent Report 4
Migration to Extent Report 4Migration to Extent Report 4
Migration to Extent Report 4
 
The Definitive Guide to Implementing Shift Left Testing in QA
The Definitive Guide to Implementing Shift Left Testing in QAThe Definitive Guide to Implementing Shift Left Testing in QA
The Definitive Guide to Implementing Shift Left Testing in QA
 
Data Seeding via Parameterized API Requests
Data Seeding via Parameterized API RequestsData Seeding via Parameterized API Requests
Data Seeding via Parameterized API Requests
 
Test Case Creation in Katalon Studio
Test Case Creation in Katalon StudioTest Case Creation in Katalon Studio
Test Case Creation in Katalon Studio
 
How to Perform Memory Leak Test Using Valgrind
How to Perform Memory Leak Test Using ValgrindHow to Perform Memory Leak Test Using Valgrind
How to Perform Memory Leak Test Using Valgrind
 

Recently uploaded

PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
Abida Shariff
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 

Recently uploaded (20)

PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 

AngularJS Project Setup step-by- step guide - RapidValue Solutions

  • 1. AngularJS Project Setup A Step-by-Step Guide Presented by: Gourav Ajmani Technical Lead, RapidValue Solutions
  • 2. AngularJS Project Setup Step By Step Guide © RapidValue Solutions 2 Contents Introduction.....................................................................................................................................................................3 Install Pre-requisites .........................................................................................................................................................3 Install the Yeoman Toolset ................................................................................................................................................5 Install a Yeoman Generator ..............................................................................................................................................5 AngularJS-RequireJS Generator .........................................................................................................................................6 Start Preparing to Create Project ......................................................................................................................................6 Configure your Generator.................................................................................................................................................6 Review the Yeoman-generated Application.........................................................................................................................8 Run the Application in the Browser ..................................................................................................................................10 Making the Application Perfect and De-coupled ................................................................................................................12 Conclusion .....................................................................................................................................................................14
  • 3. AngularJS Project Setup Step By Step Guide © RapidValue Solutions 3 Introduction AngularJS is a popular JavaScript framework. It is intended to make the implementation of RIA (Rich Internet Applications) easier and convenient. AngularJS is created and maintained by Google. It is relatively, a new JavaScript framework, which is designed to make the front-end development as simple as possible. AngularJS is a useful tool for standardizing the web application structure and it provides a future template to ensure that the client-side applications are developed much effectively. I have been working on AngularJS for a while now, and have read many tutorials and blogs on it. I could never find any article which gives a clear, concise and step-by-step guide to create the project structure and execute the project. So, I have written this document which will help you to create the Project structure and then execute it in a simple manner. Install Pre-requisites Before installing Yeoman, you will need the following:  Node.js v0.10.x+ o You can download it from here. o Set the path to NodeJS in environment variable, in this example: NodeJS is installed in “C:Program Files (x86)”. So, the path looks like :  npm (which comes bundled with Node) v2.1.0+
  • 4. AngularJS Project Setup Step By Step Guide © RapidValue Solutions 4  GIT o You can download it from here. o Set the path to GIT in environment variable. In this case, GTI got installed in “C:Program Files”. So, the path looks like:  Check if you have NodeJS and npm installed by typing (in command prompt):  By default, npm comes along with NodeJS, but you might need to update it with the latest version of it. You can update it using the command (in command prompt): Check if you have GIT installed by typing (in command prompt):
  • 5. AngularJS Project Setup Step By Step Guide © RapidValue Solutions 5 Install the Yeoman Toolset  Once you have NodeJS installed, install the Yeoman Toolset, by typing (in command prompt): It should execute/install some commands and you should be back to your command prompt without any error.  You should confirm whether all the required installation is completed , by typing (in command prompt): The above command should give you the three different versions of Yo, Bower, and Grunt respectively. Install Yeoman Generator You will need to spend time setting up the code for your web application, creating folder structure, defining and installing dependencies in traditional web development workflow. But, if you have Yeoman, it makes the task easier. So, install it.  Install a generator for AngularJS projects. o You can install Yeoman generators, using the npm command. o Install generator-angular by typing (in command prompt): This should install NodeJS packages required for the generator.
  • 6. AngularJS Project Setup Step By Step Guide © RapidValue Solutions 6 AngularJS-RequireJS Generator You should install generator for AngularJS-RequireJS and Karma-RequireJS.  Install generator-angular-require and generator-karma-require. o You can install generator for AngularJS-RequireJS & Karma-RequireJS by typing (in command prompt) It should execute/install some commands and you will get a command prompt without any error. Start Preparing to Create Project  Make a new directory (name of your application) and navigate into it. o A directory is created with the name “SampleAngularJsProject”, in local drive “G:”, and navigated there using command prompt. o Here, you need to execute Yo for angular-require along with appName. (SampleAngularJsProject) by typing (in command prompt). Type Y or n , depends on your choice, if you would like to share the usage statistic of the tool. It is preferable not to do that, so n is typed.
  • 7. AngularJS Project Setup Step By Step Guide © RapidValue Solutions 7 Configure Your Generator AngularJS generator provides an option to customize the application with the commonly developed libraries, so that it can speed up the development environment. Here, it gives an option to use Sass (with Compass) and include Twitter Bootstrap. In this, Bootstrap is included and Sass is avoided. Enter n then y , respectively, to these options. Generator will prompt to select the Angular Modules that you would like to include in the application.
  • 8. AngularJS Project Setup Step By Step Guide © RapidValue Solutions 8 You can check/un-check the modules using UP / DOWN arrow key and use the SPACE bar to select it. Let’s go ahead with the default selected one (until you are keen to include the other two modules)). Press Enter to see what Yeoman has in store for you. It should execute/install some commands and you should be back to your command prompt without any error. Review the Yeoman-generated Application Open up your “SampleAngularJsProject” directory to take a look at what was actually scaffolded. It'll look like this:
  • 9. AngularJS Project Setup Step By Step Guide © RapidValue Solutions 9
  • 10. AngularJS Project Setup Step By Step Guide © RapidValue Solutions 10 In “SampleAngularJsProject”, we have:  app: a parent directory for our application  index.html: the base html file for our Angular application  404.html, favicon.ico, and robots.txt: commonly used web files so you don’t have to create them yourself  scripts: JS files  app.js: Entry point to Angular application code  controllers: ngular controllers  styles: CSS files  views: directory for Angular templates  bower_components, bower.json: our JavaScript/web dependencies, installed by Bower  Gruntfile.js, package.json, and node_modules: configuration and dependencies required by our Grunt tasks  test: a scaffolded out test runner and the unit tests for the project, including boilerplate tests for our controllers Run the Application in the Browser To run the application, you do not have to worry about setting up the web server locally. All of it is considered by Yeoman.  Start the server o To start the server, run a grunt task to create local, node based HTTP server on localhost:9090 by typing ( In command prompt):
  • 11. AngularJS Project Setup Step By Step Guide © RapidValue Solutions 11 And, your web browser should open up, automatically, and it should launch the newly created AngularJS web application.  Auto-reload the changes in your files o Yeoman has generated an application for you in a way, so that if you make any changes in any of your file it will, automatically, force a browser refresh. o This is called live reloading. o Live reload has been configured in the gruntfile.js and it keeps a watch on certain set of files and it, automatically, reloads them if it detects any changes.
  • 12. AngularJS Project Setup Step By Step Guide © RapidValue Solutions 12 Making the Application Perfect and De-coupled Yeoman has made it easy to create the Angularjs project structure and has given us an outline and idea of how the structure should look. However, there are few suggestions, which you might want to consider, which will make your application more decoupled, maintainable and neat. If you notice the project structure above, you will see “script” folder which has app.js and a nested folder named “controllers”, which will store all the JS files of the application. There is another folder named “views”, which is used to store all the html files of the application.  This is the place where the changes need to be incorporated : o Instead of saving all the application JS files in “controllers”, it is recommended to create nested folder named “modules” under “scripts” and eliminate “controllers” folder. o Coming to “modules” folder, you should create the nested folder under “modules”, depending on the Modules you have for the application. Login module, for example. o So, you create a folder named “login” under “modules”. In “login” folder, the JS, HTML & CSS files are saved, corresponding to Login module. By doing so, you can eliminate “views” folder as well, because, the HTML’s are there in the corresponding module folder. So, the updated code structure should look like.
  • 13. AngularJS Project Setup Step By Step Guide © RapidValue Solutions 13 If you notice, there is no “controllers” & “views” folder any more but couple of other new folders, “modules”, “login” & “accounts”, each of which have their own JS, HTML & CSS files.
  • 14. AngularJS Project Setup Step By Step Guide © RapidValue Solutions 14 Conclusion AngularJS is a great option which enables you to extend HTML vocabulary for your application. The environment, thus obtained, is expressive, easily readable, and fast to develop. AngularJS is an essential toolset for building the framework which is most suited to application development. It is fully extensible and works efficiently. You are able to modify each and every feature or replace them to suit the needs and requirements of the development workflow. AngularJS has been dominating JavaScript framework and the popularity, that it has gained, reveals that the dominance will prevail in the future. This document addresses queries on AngularJS and hope the information is useful for you. Please feel free to post your queries, feedback, comments and suggestions at contactus@rapidvaluesolutions.com Reference  AngulurJS - http://www.w3schools.com/angular/angular_intro.asp  Yeoman toolset - https://github.com/yeoman/yo  Yeoman Generator - http://yeoman.io/codelab/install-generators.html  Controllers – http://www.w3schools.com/angular/angular_controllers.asp  Modules – https://docs.angularjs.org/api/ng/function/angular.module  Scripts - https://docs.angularjs.org/api/ng/directive/script  HTML - http://www.w3schools.com/html/  CSS - http://www.w3schools.com/css/  NoodleJS - http://damodaran.github.io/Books/Nodejs/noodlejs.html  Bower- https://github.com/angular/bower-angular  Grunt - https://www.npmjs.com/package/grunt-angular-builder  Node Js- http://www.tutorialspoint.com/nodejs/  GIT – https://en.wikipedia.org/wiki/GitHub  Npm - https://github.com/npm/npm
  • 15. AngularJS Project Setup Step By Step Guide © RapidValue Solutions 15 About RapidValue RapidValue is a leading provider of end-to-end mobility, omni-channel and cloud solutions to enterprises worldwide. Armed with a large team of experts in consulting, UX design and application engineering, along with experience delivering global projects, we offer a range of services across various industry verticals. RapidValue delivers its services to the world’s top brands and Fortune 1000 companies, and has offices in the United States and India. Disclaimer: This document contains information that is confidential and proprietary to RapidValue Solutions Inc. No part of it may be used, circulated, quoted, or reproduced for distribution outside RapidValue. If you are not the intended recipient of this report, you are hereby notified that the use, circulation, quoting, or reproducing of this report is strictly prohibited and may be unlawful. © RapidValue Solutions www.rapidvaluesolutions.com/blogwww.rapidvaluesolutions.com +1 877.643.1850 contactus@rapidvaluesolutions.com