SlideShare a Scribd company logo
1 of 4
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

OCTO BOF - How to build Netvibes with AngularJS
OCTO BOF - How to build Netvibes with AngularJSOCTO BOF - How to build Netvibes with AngularJS
OCTO BOF - How to build Netvibes with AngularJS
Jonathan Meiss
 
AngularJs Style Guide
AngularJs Style GuideAngularJs Style Guide
AngularJs Style Guide
Chiew Carol
 
Building The SpringGraph Flex Component
Building The SpringGraph Flex ComponentBuilding The SpringGraph Flex Component
Building The SpringGraph Flex Component
Guo Albert
 

What's hot (20)

AngularJS
AngularJSAngularJS
AngularJS
 
AngularJS for Beginners
AngularJS for BeginnersAngularJS for Beginners
AngularJS for Beginners
 
Angular.js interview questions
Angular.js interview questionsAngular.js interview questions
Angular.js interview questions
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
AngularJS 1.x training
AngularJS 1.x trainingAngularJS 1.x training
AngularJS 1.x training
 
OCTO BOF - How to build Netvibes with AngularJS
OCTO BOF - How to build Netvibes with AngularJSOCTO BOF - How to build Netvibes with AngularJS
OCTO BOF - How to build Netvibes with AngularJS
 
AngularJs Style Guide
AngularJs Style GuideAngularJs Style Guide
AngularJs Style Guide
 
The A1 "AngularJS 1 Kick Start"
The A1 "AngularJS 1 Kick Start"The A1 "AngularJS 1 Kick Start"
The A1 "AngularJS 1 Kick Start"
 
AngularJS
AngularJSAngularJS
AngularJS
 
Web components are the future of the web - Take advantage of new web technolo...
Web components are the future of the web - Take advantage of new web technolo...Web components are the future of the web - Take advantage of new web technolo...
Web components are the future of the web - Take advantage of new web technolo...
 
Introduction To Angular 4 - J2I
Introduction To Angular 4 - J2IIntroduction To Angular 4 - J2I
Introduction To Angular 4 - J2I
 
Angular 6 - The Complete Guide
Angular 6 - The Complete GuideAngular 6 - The Complete Guide
Angular 6 - The Complete Guide
 
Angular 9
Angular 9 Angular 9
Angular 9
 
AngularJS Fundamentals + WebAPI
AngularJS Fundamentals + WebAPIAngularJS Fundamentals + WebAPI
AngularJS Fundamentals + WebAPI
 
Angular 2 - How we got here?
Angular 2 - How we got here?Angular 2 - How we got here?
Angular 2 - How we got here?
 
Angular.js - JS Camp UKraine 2013
Angular.js - JS Camp UKraine 2013Angular.js - JS Camp UKraine 2013
Angular.js - JS Camp UKraine 2013
 
Itroducing Angular JS
Itroducing Angular JSItroducing Angular JS
Itroducing Angular JS
 
Angular from Scratch
Angular from ScratchAngular from Scratch
Angular from Scratch
 
Building The SpringGraph Flex Component
Building The SpringGraph Flex ComponentBuilding The SpringGraph Flex Component
Building The SpringGraph Flex Component
 
The productive developer guide to Angular 2
The productive developer guide to Angular 2The productive developer guide to Angular 2
The productive developer guide to Angular 2
 

Viewers also liked

Effective feedback in your classroom
Effective feedback in your classroomEffective feedback in your classroom
Effective feedback in your classroom
Patrick McQueeney
 
Revised classroom question presentation
Revised classroom question presentationRevised classroom question presentation
Revised classroom question presentation
Xyleanne Alforte
 
Large classes
Large classesLarge classes
Large classes
cnast
 
Management Strategies in Crowded Classes
Management Strategies in Crowded ClassesManagement Strategies in Crowded Classes
Management Strategies in Crowded Classes
Muhammad Masaud Asdaque
 
Practical Tips for Teaching Large Classes
Practical Tips for Teaching Large ClassesPractical Tips for Teaching Large Classes
Practical Tips for Teaching Large Classes
BPG
 

Viewers also liked (10)

Six steps to oral fluency - British Council Teachers Conference 2015: "Learni...
Six steps to oral fluency - British Council Teachers Conference 2015: "Learni...Six steps to oral fluency - British Council Teachers Conference 2015: "Learni...
Six steps to oral fluency - British Council Teachers Conference 2015: "Learni...
 
Effective feedback in your classroom
Effective feedback in your classroomEffective feedback in your classroom
Effective feedback in your classroom
 
Learning Together: Feedback for Students and Teachers
Learning Together: Feedback for Students and TeachersLearning Together: Feedback for Students and Teachers
Learning Together: Feedback for Students and Teachers
 
Classdroid extended - an application for improving feedback between teachers ...
Classdroid extended - an application for improving feedback between teachers ...Classdroid extended - an application for improving feedback between teachers ...
Classdroid extended - an application for improving feedback between teachers ...
 
Classroom comparisons: Student-student interactions, Corrective Feedback in t...
Classroom comparisons: Student-student interactions, Corrective Feedback in t...Classroom comparisons: Student-student interactions, Corrective Feedback in t...
Classroom comparisons: Student-student interactions, Corrective Feedback in t...
 
Revised classroom question presentation
Revised classroom question presentationRevised classroom question presentation
Revised classroom question presentation
 
Teaching large classes
Teaching large classes Teaching large classes
Teaching large classes
 
Large classes
Large classesLarge classes
Large classes
 
Management Strategies in Crowded Classes
Management Strategies in Crowded ClassesManagement Strategies in Crowded Classes
Management Strategies in Crowded Classes
 
Practical Tips for Teaching Large Classes
Practical Tips for Teaching Large ClassesPractical Tips for Teaching Large Classes
Practical Tips for Teaching Large Classes
 

Similar to Angular js getting started

Similar to Angular js getting started (20)

One Weekend With AngularJS
One Weekend With AngularJSOne Weekend With AngularJS
One Weekend With AngularJS
 
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptxangularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
 
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptxangularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
 
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptxangularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
 
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdf
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdfangularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdf
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdf
 
angularjs-vs-angular-the-key-differences-between-javascript-and-typescript
angularjs-vs-angular-the-key-differences-between-javascript-and-typescriptangularjs-vs-angular-the-key-differences-between-javascript-and-typescript
angularjs-vs-angular-the-key-differences-between-javascript-and-typescript
 
Angular Project Report
 Angular Project Report Angular Project Report
Angular Project Report
 
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdf
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdfangularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdf
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdf
 
Angular 6 Training with project in hyderabad india
Angular 6 Training with project in hyderabad indiaAngular 6 Training with project in hyderabad india
Angular 6 Training with project in hyderabad india
 
The A1 by Christian John Felix
The A1 by Christian John FelixThe A1 by Christian John Felix
The A1 by Christian John Felix
 
AngularJS
AngularJS AngularJS
AngularJS
 
Intoduction to Angularjs
Intoduction to AngularjsIntoduction to Angularjs
Intoduction to Angularjs
 
Angular js interview question answer for fresher
Angular js interview question answer for fresherAngular js interview question answer for fresher
Angular js interview question answer for fresher
 
AngularJS By Vipin
AngularJS By VipinAngularJS By Vipin
AngularJS By Vipin
 
Angular js
Angular jsAngular js
Angular js
 
Angularjs overview
Angularjs  overviewAngularjs  overview
Angularjs overview
 
Angular js
Angular jsAngular js
Angular js
 
angularjs_tutorial.docx
angularjs_tutorial.docxangularjs_tutorial.docx
angularjs_tutorial.docx
 
Angular kickstart slideshare
Angular kickstart   slideshareAngular kickstart   slideshare
Angular kickstart slideshare
 
Angularjs on line training
Angularjs on line trainingAngularjs on line training
Angularjs on line training
 

Recently uploaded

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
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
Safe Software
 

Recently uploaded (20)

Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
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
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
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...
 
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
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
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...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
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
 

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.