SlideShare a Scribd company logo
AngularJS-Getting Started
AngularJS is an open source web application framework maintained by Google and the
community to assist the single page application. Angular team calls it as the “Structural
Framework for dynamic web application”. It is a client-side technology completely written in
JavaScript. Its goal is to expand the web applications with Model-View-Controller (MVC)
capability and make development and testing easier.
AngularJS Features:
1. Two way data binding
2. Routing
3. MVC
4. Templates
5. Directives
6. History
7. Dependency injection
8. Testing
Because of these features AngularJS makes client side development easier.
AngularJS architecture
Now, Let’s have look at some of the architectural considerations of AngularJS
1. Two way data binding: AngularJS supports two way data binding. This means user inputs
in form field is automatically updated into angular models. So, that you don’t need to
watch specific events and respond to those events also don’t need to update the HTML
manually instead angular will handle it.
2. Dirty checking: AngularJS implies the concept of dirty checking. You don’t need to put the
data into specialstructures and callthe getter and setter methods. Just put your data into
simple plane old JavaScript objects and angular will respond whenever data changes and
update the view automatically.
3. Dependencyinjection:AngularJScomes with inbuilt dependency injection. You can divide
your application into different components which AngularJS can inject into each other.
Simply, it encapsulates the different pieces of application and improves the testability.
AngularJS components
Let’s have look at some of the important components of AngularJS.
1. Controllers:
a. Are the central component of any angular application
b. Controllers coordinate view and model
c. Handle the view interaction
2. Views:
a. Used for presenting data.
b. Composed of HTML templates, data binding expressions, directives and filters
3. Services:
a. Handles the non-view logic(business logic)
b. Communicate with the server
c. Hold data and state
4. Directives:
a. Way to teach HTML new tricks
b. Used to create custom HTML elements
c. Used for DOM manipulation
Getting started
To get started with the angular application just add the reference to AngularJS library. To
add the reference goto https://angularjs.org.
Once you have added the AngularJS script into page you are ready to start using it.
Now, just add a text box which allow you to type your name.
When you run above code nothing much will happen. You will just see a text box and as you type
nothing will happen.
Let’s say you want to see the value what you type in text box.
First thing add ng-app directive into html tag also ng-model.
ng-app: once you add the ng-app directive and run the application, first the angular script loads
and ng-app will initialize the application.
ng-model: what ng-model will do is ,it will add property up in the memory called “name” into
what is called as “scope”. Behind the scenes it will make an empty ViewModel and then filling it
with a “name” property.
Now, if you want to write out the value you type into the text box created earlier, then just add
a data binding expression. In angularjs “{{ }}” are used to bind the data.
Now, let’s go ahead and run, this how output looks
Find the below plunker link to test the code.
http://plnkr.co/edit/KESbO7xT4F7zZOPxFOJR?p=preview
This is a very simple example of angularjs just to get started and get feel of angular.
In the next part we will see some core concepts like controllers, modules, factories etc.
Stay tuned for more on AngularJS.

More Related Content

What's hot (20)

PDF
AngularJS
Hiten Pratap Singh
 
PDF
AngularJS for Beginners
Edureka!
 
DOCX
Angular.js interview questions
codeandyou forums
 
PPTX
Introduction to AngularJS
David Parsons
 
PPTX
AngularJS 1.x training
Roberto Ramadhin
 
PPTX
OCTO BOF - How to build Netvibes with AngularJS
Jonathan Meiss
 
PDF
AngularJs Style Guide
Chiew Carol
 
PPTX
The A1 "AngularJS 1 Kick Start"
Christian John Felix
 
DOCX
AngularJS
Ermir Hoxhaj
 
PDF
Web components are the future of the web - Take advantage of new web technolo...
Marios Fakiolas
 
PDF
Introduction To Angular 4 - J2I
Nader Debbabi
 
ODP
Angular 6 - The Complete Guide
Sam Dias
 
PPTX
Angular 9
Raja Vishnu
 
PPTX
AngularJS Fundamentals + WebAPI
Eric Wise
 
PDF
Angular 2 - How we got here?
Marios Fakiolas
 
PDF
Angular.js - JS Camp UKraine 2013
Max Klymyshyn
 
PDF
Itroducing Angular JS
Carlos Emanuel Mathiasen
 
PDF
Angular from Scratch
Christian Lilley
 
PPTX
Building The SpringGraph Flex Component
Guo Albert
 
PDF
The productive developer guide to Angular 2
Maurice De Beijer [MVP]
 
AngularJS for Beginners
Edureka!
 
Angular.js interview questions
codeandyou forums
 
Introduction to AngularJS
David Parsons
 
AngularJS 1.x training
Roberto Ramadhin
 
OCTO BOF - How to build Netvibes with AngularJS
Jonathan Meiss
 
AngularJs Style Guide
Chiew Carol
 
The A1 "AngularJS 1 Kick Start"
Christian John Felix
 
AngularJS
Ermir Hoxhaj
 
Web components are the future of the web - Take advantage of new web technolo...
Marios Fakiolas
 
Introduction To Angular 4 - J2I
Nader Debbabi
 
Angular 6 - The Complete Guide
Sam Dias
 
Angular 9
Raja Vishnu
 
AngularJS Fundamentals + WebAPI
Eric Wise
 
Angular 2 - How we got here?
Marios Fakiolas
 
Angular.js - JS Camp UKraine 2013
Max Klymyshyn
 
Itroducing Angular JS
Carlos Emanuel Mathiasen
 
Angular from Scratch
Christian Lilley
 
Building The SpringGraph Flex Component
Guo Albert
 
The productive developer guide to Angular 2
Maurice De Beijer [MVP]
 

Viewers also liked (10)

PPT
Six steps to oral fluency - British Council Teachers Conference 2015: "Learni...
Chris_Fry_Barcelona
 
PPTX
Effective feedback in your classroom
Patrick McQueeney
 
PDF
Learning Together: Feedback for Students and Teachers
Steve Chase
 
PDF
Classdroid extended - an application for improving feedback between teachers ...
jschuchter
 
PPTX
Classroom comparisons: Student-student interactions, Corrective Feedback in t...
Ercan Aksoy
 
PPTX
Revised classroom question presentation
Xyleanne Alforte
 
PPSX
Teaching large classes
Ahmed Mayouf
 
PPT
Large classes
cnast
 
PPT
Management Strategies in Crowded Classes
Muhammad Masaud Asdaque
 
PDF
Practical Tips for Teaching Large Classes
BPG
 
Six steps to oral fluency - British Council Teachers Conference 2015: "Learni...
Chris_Fry_Barcelona
 
Effective feedback in your classroom
Patrick McQueeney
 
Learning Together: Feedback for Students and Teachers
Steve Chase
 
Classdroid extended - an application for improving feedback between teachers ...
jschuchter
 
Classroom comparisons: Student-student interactions, Corrective Feedback in t...
Ercan Aksoy
 
Revised classroom question presentation
Xyleanne Alforte
 
Teaching large classes
Ahmed Mayouf
 
Large classes
cnast
 
Management Strategies in Crowded Classes
Muhammad Masaud Asdaque
 
Practical Tips for Teaching Large Classes
BPG
 
Ad

Similar to Angular js getting started (20)

PDF
One Weekend With AngularJS
Yashobanta Bai
 
PPTX
Kalp Corporate Angular Js Tutorials
Kalp Corporate
 
PPTX
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
murtazahaveliwala
 
PDF
AngularJS By Vipin
Vipin Mundayad
 
PPTX
Angularjs basic part01
Mohd Abdul Baquee
 
PPTX
AngularJS is awesome
Eusebiu Schipor
 
PPTX
Intoduction to Angularjs
Gaurav Agrawal
 
PPTX
AngularJs Basic Concept
Hari Haran
 
PPTX
Training On Angular Js
Mahima Radhakrishnan
 
PPTX
AngularJS Introduction, how to run Angular
SamuelJohnpeter
 
PPTX
ME vs WEB - AngularJS Fundamentals
Aviran Cohen
 
PPTX
Learning AngularJS - Complete coverage of AngularJS features and concepts
Suresh Patidar
 
PPTX
Intro to AngularJs
SolTech, Inc.
 
PDF
AngularJS Workshop
Gianluca Cacace
 
PPTX
Angular js
Ramakrishna kapa
 
PPTX
Angular Javascript Tutorial with command
ssuser42b933
 
PPTX
Valentine with Angular js - Introduction
Senthil Kumar
 
PPTX
Anjular js
Naga Dinesh
 
PPTX
Angular workshop - Full Development Guide
Nitin Giri
 
PPTX
Angular JS training institute in Jaipur
HEMANT SAXENA
 
One Weekend With AngularJS
Yashobanta Bai
 
Kalp Corporate Angular Js Tutorials
Kalp Corporate
 
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
murtazahaveliwala
 
AngularJS By Vipin
Vipin Mundayad
 
Angularjs basic part01
Mohd Abdul Baquee
 
AngularJS is awesome
Eusebiu Schipor
 
Intoduction to Angularjs
Gaurav Agrawal
 
AngularJs Basic Concept
Hari Haran
 
Training On Angular Js
Mahima Radhakrishnan
 
AngularJS Introduction, how to run Angular
SamuelJohnpeter
 
ME vs WEB - AngularJS Fundamentals
Aviran Cohen
 
Learning AngularJS - Complete coverage of AngularJS features and concepts
Suresh Patidar
 
Intro to AngularJs
SolTech, Inc.
 
AngularJS Workshop
Gianluca Cacace
 
Angular js
Ramakrishna kapa
 
Angular Javascript Tutorial with command
ssuser42b933
 
Valentine with Angular js - Introduction
Senthil Kumar
 
Anjular js
Naga Dinesh
 
Angular workshop - Full Development Guide
Nitin Giri
 
Angular JS training institute in Jaipur
HEMANT SAXENA
 
Ad

Recently uploaded (20)

PDF
ArcGIS Utility Network Migration - The Hunter Water Story
Safe Software
 
PPTX
2025 HackRedCon Cyber Career Paths.pptx Scott Stanton
Scott Stanton
 
PDF
Hyderabad MuleSoft In-Person Meetup (June 21, 2025) Slides
Ravi Tamada
 
PDF
Enhancing Environmental Monitoring with Real-Time Data Integration: Leveragin...
Safe Software
 
PDF
DoS Attack vs DDoS Attack_ The Silent Wars of the Internet.pdf
CyberPro Magazine
 
PDF
''Taming Explosive Growth: Building Resilience in a Hyper-Scaled Financial Pl...
Fwdays
 
PDF
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
PPTX
Smarter Governance with AI: What Every Board Needs to Know
OnBoard
 
PDF
Quantum AI Discoveries: Fractal Patterns Consciousness and Cyclical Universes
Saikat Basu
 
PDF
Hello I'm "AI" Your New _________________
Dr. Tathagat Varma
 
PPTX
Smart Factory Monitoring IIoT in Machine and Production Operations.pptx
Rejig Digital
 
PDF
How to Comply With Saudi Arabia’s National Cybersecurity Regulations.pdf
Bluechip Advanced Technologies
 
PDF
Optimizing the trajectory of a wheel loader working in short loading cycles
Reno Filla
 
PPTX
Mastering Authorization: Integrating Authentication and Authorization Data in...
Hitachi, Ltd. OSS Solution Center.
 
PDF
Kubernetes - Architecture & Components.pdf
geethak285
 
PPTX
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Pitch ...
Michele Kryston
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PPTX
Reimaginando la Ciberdefensa: De Copilots a Redes de Agentes
Cristian Garcia G.
 
PPTX
01_Approach Cyber- DORA Incident Management.pptx
FinTech Belgium
 
PDF
My Journey from CAD to BIM: A True Underdog Story
Safe Software
 
ArcGIS Utility Network Migration - The Hunter Water Story
Safe Software
 
2025 HackRedCon Cyber Career Paths.pptx Scott Stanton
Scott Stanton
 
Hyderabad MuleSoft In-Person Meetup (June 21, 2025) Slides
Ravi Tamada
 
Enhancing Environmental Monitoring with Real-Time Data Integration: Leveragin...
Safe Software
 
DoS Attack vs DDoS Attack_ The Silent Wars of the Internet.pdf
CyberPro Magazine
 
''Taming Explosive Growth: Building Resilience in a Hyper-Scaled Financial Pl...
Fwdays
 
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
Smarter Governance with AI: What Every Board Needs to Know
OnBoard
 
Quantum AI Discoveries: Fractal Patterns Consciousness and Cyclical Universes
Saikat Basu
 
Hello I'm "AI" Your New _________________
Dr. Tathagat Varma
 
Smart Factory Monitoring IIoT in Machine and Production Operations.pptx
Rejig Digital
 
How to Comply With Saudi Arabia’s National Cybersecurity Regulations.pdf
Bluechip Advanced Technologies
 
Optimizing the trajectory of a wheel loader working in short loading cycles
Reno Filla
 
Mastering Authorization: Integrating Authentication and Authorization Data in...
Hitachi, Ltd. OSS Solution Center.
 
Kubernetes - Architecture & Components.pdf
geethak285
 
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Pitch ...
Michele Kryston
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Reimaginando la Ciberdefensa: De Copilots a Redes de Agentes
Cristian Garcia G.
 
01_Approach Cyber- DORA Incident Management.pptx
FinTech Belgium
 
My Journey from CAD to BIM: A True Underdog Story
Safe Software
 

Angular js getting started

  • 1. AngularJS-Getting Started AngularJS is an open source web application framework maintained by Google and the community to assist the single page application. Angular team calls it as the “Structural Framework for dynamic web application”. It is a client-side technology completely written in JavaScript. Its goal is to expand the web applications with Model-View-Controller (MVC) capability and make development and testing easier. AngularJS Features: 1. Two way data binding 2. Routing 3. MVC 4. Templates 5. Directives 6. History 7. Dependency injection 8. Testing Because of these features AngularJS makes client side development easier. AngularJS architecture Now, Let’s have look at some of the architectural considerations of AngularJS 1. Two way data binding: AngularJS supports two way data binding. This means user inputs in form field is automatically updated into angular models. So, that you don’t need to watch specific events and respond to those events also don’t need to update the HTML manually instead angular will handle it.
  • 2. 2. Dirty checking: AngularJS implies the concept of dirty checking. You don’t need to put the data into specialstructures and callthe getter and setter methods. Just put your data into simple plane old JavaScript objects and angular will respond whenever data changes and update the view automatically. 3. Dependencyinjection:AngularJScomes with inbuilt dependency injection. You can divide your application into different components which AngularJS can inject into each other. Simply, it encapsulates the different pieces of application and improves the testability. AngularJS components Let’s have look at some of the important components of AngularJS. 1. Controllers: a. Are the central component of any angular application b. Controllers coordinate view and model c. Handle the view interaction 2. Views: a. Used for presenting data. b. Composed of HTML templates, data binding expressions, directives and filters 3. Services: a. Handles the non-view logic(business logic) b. Communicate with the server c. Hold data and state 4. Directives: a. Way to teach HTML new tricks b. Used to create custom HTML elements c. Used for DOM manipulation Getting started To get started with the angular application just add the reference to AngularJS library. To add the reference goto https://angularjs.org. Once you have added the AngularJS script into page you are ready to start using it.
  • 3. Now, just add a text box which allow you to type your name. When you run above code nothing much will happen. You will just see a text box and as you type nothing will happen. Let’s say you want to see the value what you type in text box. First thing add ng-app directive into html tag also ng-model. ng-app: once you add the ng-app directive and run the application, first the angular script loads and ng-app will initialize the application. ng-model: what ng-model will do is ,it will add property up in the memory called “name” into what is called as “scope”. Behind the scenes it will make an empty ViewModel and then filling it with a “name” property. Now, if you want to write out the value you type into the text box created earlier, then just add a data binding expression. In angularjs “{{ }}” are used to bind the data.
  • 4. Now, let’s go ahead and run, this how output looks Find the below plunker link to test the code. http://plnkr.co/edit/KESbO7xT4F7zZOPxFOJR?p=preview This is a very simple example of angularjs just to get started and get feel of angular. In the next part we will see some core concepts like controllers, modules, factories etc. Stay tuned for more on AngularJS.