SlideShare a Scribd company logo
1 of 20
Download to read offline
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

More Related Content

What's hot

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
 

What's hot (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 to Introduction to Angular Js

Similar to 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
 

More from 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
 

Recently uploaded

Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
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
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
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
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 

Recently uploaded (20)

Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
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
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
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
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).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