SlideShare ist ein Scribd-Unternehmen logo
1 von 15
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

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 &UXJWORKS powered by Ordina
 
AngularJS for designers and developers
AngularJS for designers and developersAngularJS for designers and developers
AngularJS for designers and developersKai Koenig
 
AngularJS introduction
AngularJS introductionAngularJS introduction
AngularJS introductionTania Gonzales
 
AngularJS best-practices
AngularJS best-practicesAngularJS best-practices
AngularJS best-practicesHenry 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 AngularJSWei Ru
 
Understanding angular js
Understanding angular jsUnderstanding angular js
Understanding angular jsAayush Shrestha
 
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 startedSté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 JSBipin
 

Was ist angesagt? (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
 

Andere mochten auch

AngularJS Architecture
AngularJS ArchitectureAngularJS Architecture
AngularJS ArchitectureEyal Vardi
 
Single Page Application (SPA) using AngularJS
Single Page Application (SPA) using AngularJSSingle Page Application (SPA) using AngularJS
Single Page Application (SPA) using AngularJSM R Rony
 
29 Essential AngularJS Interview Questions
29 Essential AngularJS Interview Questions29 Essential AngularJS Interview Questions
29 Essential AngularJS Interview QuestionsArc & Codementor
 
Overview about AngularJS Framework
Overview about AngularJS Framework Overview about AngularJS Framework
Overview about AngularJS Framework Camilo Lopes
 
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 AppEngineRoman Kirillov
 
Building ColdFusion And AngularJS Applications
Building ColdFusion And AngularJS ApplicationsBuilding ColdFusion And AngularJS Applications
Building ColdFusion And AngularJS ApplicationsColdFusionConference
 
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 AirWatchVMworld
 
Building single page applications
Building single page applicationsBuilding single page applications
Building single page applicationsSC5.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 ManagementBala 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 presentationratneshsinghparihar
 
blood, blood product, blood transfusion
blood, blood product, blood transfusionblood, blood product, blood transfusion
blood, blood product, blood transfusionHidayat Shariff
 
DepED Master Teacher I and II
DepED Master Teacher I and IIDepED Master Teacher I and II
DepED Master Teacher I and IIjoems_angel2000
 
The Main and Subordinate Clause
The Main and Subordinate ClauseThe Main and Subordinate Clause
The Main and Subordinate ClauseRachel Jones
 

Andere mochten auch (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
 

Ähnlich wie 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 applicationSuresh Patidar
 
Django simplified : by weever mbakaya
Django simplified : by weever mbakayaDjango simplified : by weever mbakaya
Django simplified : by weever mbakayaMbakaya 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 schkannikadg
 
Getting started with appium
Getting started with appiumGetting started with appium
Getting started with appiumPratik 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 ReportersHaitham Refaat
 
Angular kickstart slideshare
Angular kickstart   slideshareAngular kickstart   slideshare
Angular kickstart slideshareSaleemMalik52
 
Angularjs 131211063348-phpapp01
Angularjs 131211063348-phpapp01Angularjs 131211063348-phpapp01
Angularjs 131211063348-phpapp01Arunangsu Sahu
 
angularjs_tutorial.docx
angularjs_tutorial.docxangularjs_tutorial.docx
angularjs_tutorial.docxtelegramvip
 
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 RequireJSJohannes Weber
 
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 - IntroductionWebStackAcademy
 
Adding User Management to Node.js
Adding User Management to Node.jsAdding User Management to Node.js
Adding User Management to Node.jsDev_Events
 
Progressive Web Application by Citytech
Progressive Web Application by CitytechProgressive Web Application by Citytech
Progressive Web Application by CitytechRitwik 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 DevelopersMars Devs
 
Dive into Angular, part 5: Experience
Dive into Angular, part 5: ExperienceDive into Angular, part 5: Experience
Dive into Angular, part 5: ExperienceOleksii Prohonnyi
 

Ähnlich wie 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
AngularJsAngularJs
AngularJs
 
Angularjs 131211063348-phpapp01
Angularjs 131211063348-phpapp01Angularjs 131211063348-phpapp01
Angularjs 131211063348-phpapp01
 
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
 
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
 
Dive into Angular, part 5: Experience
Dive into Angular, part 5: ExperienceDive into Angular, part 5: Experience
Dive into Angular, part 5: Experience
 

Mehr von 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-SpaRapidValue
 
Play with Jenkins Pipeline
Play with Jenkins PipelinePlay with Jenkins Pipeline
Play with Jenkins PipelineRapidValue
 
Accessibility Testing using Axe
Accessibility Testing using AxeAccessibility Testing using Axe
Accessibility Testing using AxeRapidValue
 
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 KotlinRapidValue
 
Automation in Digital Cloud Labs
Automation in Digital Cloud LabsAutomation in Digital Cloud Labs
Automation in Digital Cloud LabsRapidValue
 
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 BenefitsRapidValue
 
Uploading Data Using Oracle Web ADI
Uploading Data Using Oracle Web ADIUploading Data Using Oracle Web ADI
Uploading Data Using Oracle Web ADIRapidValue
 
Appium Automation with Kotlin
Appium Automation with KotlinAppium Automation with Kotlin
Appium Automation with KotlinRapidValue
 
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 360RapidValue
 
Python Google Cloud Function with CORS
Python Google Cloud Function with CORSPython Google Cloud Function with CORS
Python Google Cloud Function with CORSRapidValue
 
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 ChannelRapidValue
 
Automation Testing with KATALON Cucumber BDD
Automation Testing with KATALON Cucumber BDDAutomation Testing with KATALON Cucumber BDD
Automation Testing with KATALON Cucumber BDDRapidValue
 
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 FrameworkRapidValue
 
Video Recording of Selenium Automation Flows
Video Recording of Selenium Automation FlowsVideo Recording of Selenium Automation Flows
Video Recording of Selenium Automation FlowsRapidValue
 
JMeter JMX Script Creation via BlazeMeter
JMeter JMX Script Creation via BlazeMeterJMeter JMX Script Creation via BlazeMeter
JMeter JMX Script Creation via BlazeMeterRapidValue
 
Migration to Extent Report 4
Migration to Extent Report 4Migration to Extent Report 4
Migration to Extent Report 4RapidValue
 
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 QARapidValue
 
Data Seeding via Parameterized API Requests
Data Seeding via Parameterized API RequestsData Seeding via Parameterized API Requests
Data Seeding via Parameterized API RequestsRapidValue
 
Test Case Creation in Katalon Studio
Test Case Creation in Katalon StudioTest Case Creation in Katalon Studio
Test Case Creation in Katalon StudioRapidValue
 
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 ValgrindRapidValue
 

Mehr von 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
 

Kürzlich hochgeladen

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 

Kürzlich hochgeladen (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 

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