SlideShare una empresa de Scribd logo
1 de 20
Descargar para leer sin conexión
Angular JS tutorial
by professionalguru
A brief Introduction :
• What is Angular JS ?
Angular JS is a JavaScript framework. It can be
added to an HTML page with a <script> tag.
Angular JS extends HTML attributes with Directives,
and binds data to HTML with Expressions.
http://professional-guru.com
• Why Angular JS ?
Other frameworks deal with HTML’s shortcomings
by either abstracting away HTML, CSS, and/or
JavaScript or by providing an imperative way for
manipulating the DOM. Neither of these address the
root problem that HTML was not designed for
dynamic views.
http://professional-guru.com
1. Structure, Quality and Organization
2. Lightweight ( < 36KB compressed and minified)
3. Free
4. Separation of concern
5. Modularity
6. Extensibility & Maintainability
7. Reusable Components
http://professional-guru.com
JQuery :
• Allows for DOM Manipulation
• Does not provide structure to your code
• Does not allow for two way binding
http://professional-guru.com
Features of AngularJS:
• Two-way Data Binding – Model as single source
of truth
• Directives – Extend HTML
• MVC
• Dependency Injection
• Testing
• Deep Linking (Map URL to route Definition)
• Server-Side Communication
http://professional-guru.com
Data Binding:
<html ng-app>
<head>
<script src='angular.js'></script>
</head>
<body>
<input ng-model='user.name'>
<div ng-show='user.name'>Hi
{{user.name}}</div>
</body>
</html>
http://professional-guru.com
MVC:
Model (Data)
View (UI)
Notifies
NotifiesController
(Logic)
NotifiesChanges
http://professional-guru.com
Hello HTML:
<p>Hello World!</p>
http://professional-guru.com
• Hello Javascript:
<p id="greeting1"></p>
<script>
var isIE = document.attachEvent;
var addListener = isIE
? function(e, t, fn) {
e.attachEvent('on' + t, fn);}
: function(e, t, fn) {
e.addEventListener(t, fn, false);};
addListener(document, 'load', function(){
var greeting = document.getElementById('greeting1');
if (isIE) {
greeting.innerText = 'Hello World!';
} else {
greeting.textContent = 'Hello World!';
}
});
</script>
http://professional-guru.com
Hello Jquery:
<p id="greeting2"></p>
<script>
$(function(){
$('#greeting2').text('Hello World!');
});
</script>
http://professional-guru.com
Hello AngularJS:
<p ng:init="greeting = 'Hello
World!'">{{greeting}}</p>
http://professional-guru.com
Angular JS Applications:
• Angular JS modules define Angular JS
applications.
• Angular JS controllers control Angular JS
applications.
• The ng-app directive defines the application,
the ng-controller directive defines the controller.
http://professional-guru.com
Angular JS Expressions:
• Angular JS expressions can be written inside double
braces: {{ expression }}.
• Angular JS expressions can also be written inside a
directive: ng-bind="expression".
• Angular JS will resolve the expression, and return
the result exactly where the expression is written
http://professional-guru.com
AngularJS Modules:
• An Angular JS module defines an application.
• The module is a container for the different parts of
an application.
• The module is a container for the application
controllers.
• Controllers always belong to a module.
http://professional-guru.com
Angular JS Directives:
• Angular JS lets you extend HTML with new
attributes called Directives.
• Angular JS has a set of built-in directives which
offers functionality to your applications.
• Angular JS also lets you define your own directives.
http://professional-guru.com
Angular JS Directives:
• Angular JS directives are extended HTML
attributes with the prefix ng-.
• The ng-app directive initializes an Angular JS
application.
• The ng-init directive initializes application data.
• The ng-model directive binds the value of HTML
controls (input, select, textarea) to application data.
http://professional-guru.com
Angular JS Controllers:
• Angular JS controllers control the data of Angular
JS applications.
• Angular JS controllers are regular JavaScript
Objects.
• Angular JS applications are controlled by
controllers.
• The ng-controller directive defines the
application controller.
• A controller is a JavaScript Object, created by
a standard JavaScript object constructor.
http://professional-guru.com
Angular JS Services:
•In Angular JS you can make your own service, or
use one of the many built-in services.
•What is a Service?
•In Angular JS, a service is a function, or object,
that is available for, and limited to, your Angular
JS application.
•Angular JS has about 30 built-in services. One of
them is the $location service.
http://professional-guru.com
Angular JS Global API:
• The Angular JS Global API is a set of global
JavaScript functions for performing common tasks
like:
• Comparing objects
• Iterating objects
• Converting data
• The Global API functions are accessed using the
angular object.
http://professional-guru.com

Más contenido relacionado

La actualidad más candente

Introduction to AngularJS Framework
Introduction to AngularJS FrameworkIntroduction to AngularJS Framework
Introduction to AngularJS FrameworkRaveendra R
 
Angular JS, A dive to concepts
Angular JS, A dive to conceptsAngular JS, A dive to concepts
Angular JS, A dive to conceptsAbhishek Sur
 
Angular js 1.3 presentation for fed nov 2014
Angular js 1.3 presentation for fed   nov 2014Angular js 1.3 presentation for fed   nov 2014
Angular js 1.3 presentation for fed nov 2014Sarah Hudson
 
Angular js
Angular jsAngular js
Angular jsMindtree
 
Angular JS - Introduction
Angular JS - IntroductionAngular JS - Introduction
Angular JS - IntroductionSagar Acharya
 
AngularJS intro
AngularJS introAngularJS intro
AngularJS introdizabl
 
Introduction of angular js
Introduction of angular jsIntroduction of angular js
Introduction of angular jsTamer Solieman
 
What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edu...
What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edu...What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edu...
What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edu...Edureka!
 
Introduction to Angularjs : kishan kumar
Introduction to Angularjs : kishan kumarIntroduction to Angularjs : kishan kumar
Introduction to Angularjs : kishan kumarAppfinz Technologies
 
Introduction to Knockout Js
Introduction to Knockout JsIntroduction to Knockout Js
Introduction to Knockout JsKnoldus Inc.
 
Angular View Encapsulation
Angular View EncapsulationAngular View Encapsulation
Angular View EncapsulationJennifer Estrada
 
Introduction to AngularJS By Bharat Makwana
Introduction to AngularJS By Bharat MakwanaIntroduction to AngularJS By Bharat Makwana
Introduction to AngularJS By Bharat MakwanaBharat Makwana
 
Learning AngularJS - Complete coverage of AngularJS features and concepts
Learning AngularJS  - Complete coverage of AngularJS features and conceptsLearning AngularJS  - Complete coverage of AngularJS features and concepts
Learning AngularJS - Complete coverage of AngularJS features and conceptsSuresh Patidar
 

La actualidad más candente (20)

Angularjs PPT
Angularjs PPTAngularjs PPT
Angularjs PPT
 
Introduction to AngularJS Framework
Introduction to AngularJS FrameworkIntroduction to AngularJS Framework
Introduction to AngularJS Framework
 
Module2
Module2Module2
Module2
 
Angular JS, A dive to concepts
Angular JS, A dive to conceptsAngular JS, A dive to concepts
Angular JS, A dive to concepts
 
AngularJS
AngularJSAngularJS
AngularJS
 
Angular js 1.3 presentation for fed nov 2014
Angular js 1.3 presentation for fed   nov 2014Angular js 1.3 presentation for fed   nov 2014
Angular js 1.3 presentation for fed nov 2014
 
AngularJS
AngularJSAngularJS
AngularJS
 
Angular js
Angular jsAngular js
Angular js
 
What's new in Angular 2?
What's new in Angular 2?What's new in Angular 2?
What's new in Angular 2?
 
Angular JS - Introduction
Angular JS - IntroductionAngular JS - Introduction
Angular JS - Introduction
 
AngularJS intro
AngularJS introAngularJS intro
AngularJS intro
 
Introduction of angular js
Introduction of angular jsIntroduction of angular js
Introduction of angular js
 
What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edu...
What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edu...What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edu...
What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edu...
 
Angularjs tutorial
Angularjs tutorialAngularjs tutorial
Angularjs tutorial
 
Introduction to Angularjs : kishan kumar
Introduction to Angularjs : kishan kumarIntroduction to Angularjs : kishan kumar
Introduction to Angularjs : kishan kumar
 
Introduction to Knockout Js
Introduction to Knockout JsIntroduction to Knockout Js
Introduction to Knockout Js
 
Angular View Encapsulation
Angular View EncapsulationAngular View Encapsulation
Angular View Encapsulation
 
Introduction to AngularJS By Bharat Makwana
Introduction to AngularJS By Bharat MakwanaIntroduction to AngularJS By Bharat Makwana
Introduction to AngularJS By Bharat Makwana
 
Learning AngularJS - Complete coverage of AngularJS features and concepts
Learning AngularJS  - Complete coverage of AngularJS features and conceptsLearning AngularJS  - Complete coverage of AngularJS features and concepts
Learning AngularJS - Complete coverage of AngularJS features and concepts
 
Introduction to Angular JS
Introduction to Angular JSIntroduction to Angular JS
Introduction to Angular JS
 

Similar a Introduction to Angular Js

Similar a Introduction to Angular Js (20)

Angular js anupama
Angular js anupamaAngular js anupama
Angular js anupama
 
Angularjs basic part01
Angularjs basic part01Angularjs basic part01
Angularjs basic part01
 
AngularJS is awesome
AngularJS is awesomeAngularJS is awesome
AngularJS is awesome
 
Angularjs
AngularjsAngularjs
Angularjs
 
Angular js
Angular jsAngular js
Angular js
 
Angular js
Angular jsAngular js
Angular js
 
Angular js
Angular jsAngular js
Angular js
 
AngularJS.pptx
AngularJS.pptxAngularJS.pptx
AngularJS.pptx
 
Angular js 1.3 basic tutorial
Angular js 1.3 basic tutorialAngular js 1.3 basic tutorial
Angular js 1.3 basic tutorial
 
Angular patterns
Angular patternsAngular patterns
Angular patterns
 
Intoduction to Angularjs
Intoduction to AngularjsIntoduction to Angularjs
Intoduction to Angularjs
 
Angularjs for kolkata drupal meetup
Angularjs for kolkata drupal meetupAngularjs for kolkata drupal meetup
Angularjs for kolkata drupal meetup
 
A perfect choice for web apps
A perfect choice for web apps A perfect choice for web apps
A perfect choice for web apps
 
AngularJS
AngularJSAngularJS
AngularJS
 
Valentine with Angular js - Introduction
Valentine with Angular js - IntroductionValentine with Angular js - Introduction
Valentine with Angular js - Introduction
 
ME vs WEB - AngularJS Fundamentals
ME vs WEB - AngularJS FundamentalsME vs WEB - AngularJS Fundamentals
ME vs WEB - AngularJS Fundamentals
 
Introduction to Angularjs
Introduction to AngularjsIntroduction to Angularjs
Introduction to Angularjs
 
Angular js up & running
Angular js up & runningAngular js up & running
Angular js up & running
 
CraftCamp for Students - Introduction to AngularJS
CraftCamp for Students - Introduction to AngularJSCraftCamp for Students - Introduction to AngularJS
CraftCamp for Students - Introduction to AngularJS
 
Angular JS Indtrodution
Angular JS IndtrodutionAngular JS Indtrodution
Angular JS Indtrodution
 

Más de Professional Guru (20)

introduction to AWs
introduction to AWsintroduction to AWs
introduction to AWs
 
introduction to AWs
introduction to AWsintroduction to AWs
introduction to AWs
 
Introduction to JAVA
Introduction to JAVAIntroduction to JAVA
Introduction to JAVA
 
Introduction to Java
Introduction to JavaIntroduction to Java
Introduction to Java
 
Introduction to Big Data
Introduction to Big DataIntroduction to Big Data
Introduction to Big Data
 
Introduction to Azure
Introduction to AzureIntroduction to Azure
Introduction to Azure
 
introduction to DEVOPS
introduction to DEVOPSintroduction to DEVOPS
introduction to DEVOPS
 
Introduction to Azure
Introduction to AzureIntroduction to Azure
Introduction to Azure
 
Introduction to Java
Introduction to JavaIntroduction to Java
Introduction to Java
 
Introduction to Angular Js
Introduction to Angular JsIntroduction to Angular Js
Introduction to Angular Js
 
Dev ops concept
Dev ops conceptDev ops concept
Dev ops concept
 
Robotic Process Automation
Robotic Process AutomationRobotic Process Automation
Robotic Process Automation
 
Dev ops concept
Dev ops conceptDev ops concept
Dev ops concept
 
Introduction to AWS
Introduction to AWSIntroduction to AWS
Introduction to AWS
 
introduction to hadoop
introduction to hadoopintroduction to hadoop
introduction to hadoop
 
Introduction to SQL SERVER
Introduction to  SQL SERVERIntroduction to  SQL SERVER
Introduction to SQL SERVER
 
Introduction to Java
Introduction to JavaIntroduction to Java
Introduction to Java
 
Introduction to Azure
Introduction to AzureIntroduction to Azure
Introduction to Azure
 
Introduction to HTML
Introduction to HTML Introduction to HTML
Introduction to HTML
 
Rpa developer resume
Rpa developer resumeRpa developer resume
Rpa developer resume
 

Último

Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 

Último (20)

Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 

Introduction to Angular Js

  • 1. Angular JS tutorial by professionalguru
  • 2. A brief Introduction : • What is Angular JS ? Angular JS is a JavaScript framework. It can be added to an HTML page with a <script> tag. Angular JS extends HTML attributes with Directives, and binds data to HTML with Expressions. http://professional-guru.com
  • 3. • Why Angular JS ? Other frameworks deal with HTML’s shortcomings by either abstracting away HTML, CSS, and/or JavaScript or by providing an imperative way for manipulating the DOM. Neither of these address the root problem that HTML was not designed for dynamic views. http://professional-guru.com
  • 4. 1. Structure, Quality and Organization 2. Lightweight ( < 36KB compressed and minified) 3. Free 4. Separation of concern 5. Modularity 6. Extensibility & Maintainability 7. Reusable Components http://professional-guru.com
  • 5. JQuery : • Allows for DOM Manipulation • Does not provide structure to your code • Does not allow for two way binding http://professional-guru.com
  • 6. Features of AngularJS: • Two-way Data Binding – Model as single source of truth • Directives – Extend HTML • MVC • Dependency Injection • Testing • Deep Linking (Map URL to route Definition) • Server-Side Communication http://professional-guru.com
  • 7. Data Binding: <html ng-app> <head> <script src='angular.js'></script> </head> <body> <input ng-model='user.name'> <div ng-show='user.name'>Hi {{user.name}}</div> </body> </html> http://professional-guru.com
  • 10. • Hello Javascript: <p id="greeting1"></p> <script> var isIE = document.attachEvent; var addListener = isIE ? function(e, t, fn) { e.attachEvent('on' + t, fn);} : function(e, t, fn) { e.addEventListener(t, fn, false);}; addListener(document, 'load', function(){ var greeting = document.getElementById('greeting1'); if (isIE) { greeting.innerText = 'Hello World!'; } else { greeting.textContent = 'Hello World!'; } }); </script> http://professional-guru.com
  • 12. Hello AngularJS: <p ng:init="greeting = 'Hello World!'">{{greeting}}</p> http://professional-guru.com
  • 13. Angular JS Applications: • Angular JS modules define Angular JS applications. • Angular JS controllers control Angular JS applications. • The ng-app directive defines the application, the ng-controller directive defines the controller. http://professional-guru.com
  • 14. Angular JS Expressions: • Angular JS expressions can be written inside double braces: {{ expression }}. • Angular JS expressions can also be written inside a directive: ng-bind="expression". • Angular JS will resolve the expression, and return the result exactly where the expression is written http://professional-guru.com
  • 15. AngularJS Modules: • An Angular JS module defines an application. • The module is a container for the different parts of an application. • The module is a container for the application controllers. • Controllers always belong to a module. http://professional-guru.com
  • 16. Angular JS Directives: • Angular JS lets you extend HTML with new attributes called Directives. • Angular JS has a set of built-in directives which offers functionality to your applications. • Angular JS also lets you define your own directives. http://professional-guru.com
  • 17. Angular JS Directives: • Angular JS directives are extended HTML attributes with the prefix ng-. • The ng-app directive initializes an Angular JS application. • The ng-init directive initializes application data. • The ng-model directive binds the value of HTML controls (input, select, textarea) to application data. http://professional-guru.com
  • 18. Angular JS Controllers: • Angular JS controllers control the data of Angular JS applications. • Angular JS controllers are regular JavaScript Objects. • Angular JS applications are controlled by controllers. • The ng-controller directive defines the application controller. • A controller is a JavaScript Object, created by a standard JavaScript object constructor. http://professional-guru.com
  • 19. Angular JS Services: •In Angular JS you can make your own service, or use one of the many built-in services. •What is a Service? •In Angular JS, a service is a function, or object, that is available for, and limited to, your Angular JS application. •Angular JS has about 30 built-in services. One of them is the $location service. http://professional-guru.com
  • 20. Angular JS Global API: • The Angular JS Global API is a set of global JavaScript functions for performing common tasks like: • Comparing objects • Iterating objects • Converting data • The Global API functions are accessed using the angular object. http://professional-guru.com