SlideShare a Scribd company logo
1 of 23
Download to read offline
Everything You Need To Know About
By Sina Mirhejazi
WHAT IS ?
➤ It’s not a JavaScript Library. There is no
function which we can directly call and use.
➤ It’s not a DOM manipulation library like
jQuery. But it uses subset of jQuery to
manipulation (Called jqLite).
➤ Focus more on HTML side of web apps.
➤ For MVC/MVVM design patterns.
PHILOSOPHY
➤ Angular is what HTML could have been if it
had been designed for applications.
➤ HTML is a great declarative language for static
documents. It does not contain much in the way
of creating application.
➤ Building web-applications is an exercise in
what do I have to do, so that I trick the browser
in to do what I want.
➤ Thats why we have frameworks - set of utility
functions and libraries for DOM manipulation.
➤ Angular takes another approach.
➤ Angular teaches the browser new syntax.
➤ One way data binding means creating View once and leave Model
behind. Whenever we want to change something, we have to
change Model and render View again.
➤ Two way data binding link View and Model together and every
changes to each one affect another continuously.
➤ How?
WHERE THINGS START?
➤ It all starts when you add angular script to your code. THAT SIMPLE!
ANGULAR MODULES
➤ Angular works with modules.
➤ Module for main App.
➤ Module for components.
➤ Muddle for everything.
ANGULAR CONTROLLERS
➤ We use a Controller to provide data for our Views.
➤ We should not use Controllers to manipulate DOM.
DEPENDENCY INJECTION
➤ DI is a way to tell angular which service needs what.
➤ There are several ways to do this.
SCOPE
➤ Scope is a link between controller and view.
➤ We can add properties to our $scope object in controllers and get them on view.
➤ More on Scopes later.
ANGULAR DIRECTIVES
➤ Directives are out only chance to manipulate DOM.
➤ Directives can teach HTML new stuff.
➤ They can be attributes, classes(!), comments(!) and even tag elements!!!
➤ We seen a couple of them earlier like:
➤ ng-app
➤ ng-controller
➤ ng-repeat
➤ ng-show
ANGULAR DIRECTIVES
➤ ng-app
➤ ng-app specify out main module to run the application.
➤ IT goes on <html> tag.
➤ ng-controller
➤ ng-controller link a controller to part of our DOM.
➤ $scope of controller affect the part of DOM that ng-controller linked to. And It’s
child of course.
ANGULAR DIRECTIVES
➤ ng-repeat
➤ ng-repeat iterate between items of a given object/array. Just like for…in.
➤ ng-show/ng-hide
➤ These twins get an expression and show/hide whether it’s true or false.
➤ ng-if
➤ This one gets an expression and comment/uncomment the element that contains
it.
ANGULAR DIRECTIVES
➤ ng-click
➤ ng-click get an expression(usually a function) and fire that expression in case of
click.
➤ ng-bind
➤ This one is all awesomeness of AngularJS
➤ ng-bind replace text content of it’s tag with a given expression.
➤ AND change it whenever expression change!
➤ It has a little brother named {{expression}}
ANGULAR EXPRESSIONS
➤ What is this expression we keep talking about?
➤ Expression is a snippet of JavaScript code, inside HTML tags and attributes.
➤ They live inside HTML tags under the shield of {{}} and in attributes.
ANGULAR FILTERS
➤ A filter formats the value of an expression for display to the user.
➤ There are 5 built-in filters and we can write our own filters.
➤ Built-in filters are:
➤ uppercase: Format a string to upper case.
➤ lowercase: Format a string to lower case.
➤ currency: Format a number to a currency format.
➤ orderBy: Orders an array by an expression.
➤ filter: Select a subset of items from an array.
SERVICES, FACTORIES AND PROVIDERS
➤ Services, Factories and Providers are for providing data to our application.
➤ They are singletons(unlike controllers that instantiate every time we call them).
Which means there is only one instance of specific Factory in whole application. So
we can share data between controllers.
➤ There is a slight difference between them. Providers and be configured before
application start(some kind of constructor for whole app called config phase).
➤ There are two other type of recipe to define data in AngularJS named ”Value” and
”Constant”. Just to mention.
FACTORY
ROUTING AND TEMPLATES
➤ AngularJS can handle routes by using ngRoute module.
➤ We just need to add angular-route script and add ngRoute as a dependency to our
app module.
➤ Also some configuration need to be done.
JUST A LITTLE BIT MORE ABOUT SCOPES
$BROADCAST, $EMIT, $ON
➤ AngularJS has a great way to communicate between different scopes.
➤ A scope can talk to its child through $broadcast.
➤ It can talk to its parents through $emit.
➤ And everyone can listen to their family using $on.
ANGULAR RESOURCE
➤ AngularJS needs ngResource module to communicate with server.
➤ Dont forget to add ngResource to app dependencies
AngularJS has some great friends to help him grow.
RESOURCES
➤ AngularJS Documentation: http://docs.angularjs.org
➤ Some Good Slides:
➤ Everything you need to know to get started http://goo.gl/sqHKdU
➤ AngularJS Basics with Example http://goo.gl/Bh6D9K
➤ Introduction to AngularJS http://goo.gl/524fTR
➤ Angular Style Guide, John Papa https://goo.gl/ft7Vec
➤ Don’t forget to check Youtube for so many good workshop and tutorials

More Related Content

What's hot

Javascript
JavascriptJavascript
JavascriptIblesoft
 
Get rid of controllers in angular 1.5.x start using component directives
Get rid of controllers in angular 1.5.x start using component directivesGet rid of controllers in angular 1.5.x start using component directives
Get rid of controllers in angular 1.5.x start using component directivesMarios Fakiolas
 
Why angular js Framework
Why angular js Framework Why angular js Framework
Why angular js Framework Sakthi Bro
 
Advanced AngularJS Concepts
Advanced AngularJS ConceptsAdvanced AngularJS Concepts
Advanced AngularJS ConceptsKyle Hodgson
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJSDavid Parsons
 
Migrating an application from Angular 1 to Angular 2
Migrating an application from Angular 1 to Angular 2 Migrating an application from Angular 1 to Angular 2
Migrating an application from Angular 1 to Angular 2 Ross Dederer
 
Setting up Page Object Model in Automation Framework
Setting up Page Object Model in Automation FrameworkSetting up Page Object Model in Automation Framework
Setting up Page Object Model in Automation Frameworkvaluebound
 
Angular JS - Introduction
Angular JS - IntroductionAngular JS - Introduction
Angular JS - IntroductionSagar Acharya
 
Angular2 with TypeScript
Angular2 with TypeScript Angular2 with TypeScript
Angular2 with TypeScript Rohit Bishnoi
 
Introduction of angular js
Introduction of angular jsIntroduction of angular js
Introduction of angular jsTamer Solieman
 
Building End-to-End Apps Using Typescript
Building End-to-End Apps Using TypescriptBuilding End-to-End Apps Using Typescript
Building End-to-End Apps Using TypescriptGil Fink
 
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
 
Angularjs architecture
Angularjs architectureAngularjs architecture
Angularjs architectureMichael He
 
Java script
Java scriptJava script
Java scriptITz_1
 
Migrating an Application from Angular 1 to Angular 2
Migrating an Application from Angular 1 to Angular 2 Migrating an Application from Angular 1 to Angular 2
Migrating an Application from Angular 1 to Angular 2 Ross Dederer
 

What's hot (20)

Javascript
JavascriptJavascript
Javascript
 
Get rid of controllers in angular 1.5.x start using component directives
Get rid of controllers in angular 1.5.x start using component directivesGet rid of controllers in angular 1.5.x start using component directives
Get rid of controllers in angular 1.5.x start using component directives
 
Why angular js Framework
Why angular js Framework Why angular js Framework
Why angular js Framework
 
Advanced AngularJS Concepts
Advanced AngularJS ConceptsAdvanced AngularJS Concepts
Advanced AngularJS Concepts
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
Migrating an application from Angular 1 to Angular 2
Migrating an application from Angular 1 to Angular 2 Migrating an application from Angular 1 to Angular 2
Migrating an application from Angular 1 to Angular 2
 
Js ppt
Js pptJs ppt
Js ppt
 
Setting up Page Object Model in Automation Framework
Setting up Page Object Model in Automation FrameworkSetting up Page Object Model in Automation Framework
Setting up Page Object Model in Automation Framework
 
Angular js PPT
Angular js PPTAngular js PPT
Angular js PPT
 
Angular JS - Introduction
Angular JS - IntroductionAngular JS - Introduction
Angular JS - Introduction
 
Angular2 with TypeScript
Angular2 with TypeScript Angular2 with TypeScript
Angular2 with TypeScript
 
Java Script
Java ScriptJava Script
Java Script
 
Introduction of angular js
Introduction of angular jsIntroduction of angular js
Introduction of angular js
 
J Query
J QueryJ Query
J Query
 
Building End-to-End Apps Using Typescript
Building End-to-End Apps Using TypescriptBuilding End-to-End Apps Using Typescript
Building End-to-End Apps Using Typescript
 
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
 
Angularjs architecture
Angularjs architectureAngularjs architecture
Angularjs architecture
 
Java script
Java scriptJava script
Java script
 
Migrating an Application from Angular 1 to Angular 2
Migrating an Application from Angular 1 to Angular 2 Migrating an Application from Angular 1 to Angular 2
Migrating an Application from Angular 1 to Angular 2
 

Similar to Everything You Need To Know About AngularJS

Intoduction to Angularjs
Intoduction to AngularjsIntoduction to Angularjs
Intoduction to AngularjsGaurav Agrawal
 
Angular Project Report
 Angular Project Report Angular Project Report
Angular Project ReportKodexhub
 
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 fresherRavi Bhadauria
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJSAnass90
 
introduction to Angularjs basics
introduction to Angularjs basicsintroduction to Angularjs basics
introduction to Angularjs basicsRavindra K
 
Angular Js Get Started - Complete Course
Angular Js Get Started - Complete CourseAngular Js Get Started - Complete Course
Angular Js Get Started - Complete CourseEPAM Systems
 
Angular workshop - Full Development Guide
Angular workshop - Full Development GuideAngular workshop - Full Development Guide
Angular workshop - Full Development GuideNitin Giri
 
AngularJS Fundamentals + WebAPI
AngularJS Fundamentals + WebAPIAngularJS Fundamentals + WebAPI
AngularJS Fundamentals + WebAPIEric Wise
 
Overview of the AngularJS framework
Overview of the AngularJS framework Overview of the AngularJS framework
Overview of the AngularJS framework Yakov Fain
 
Introduction to Angularjs : kishan kumar
Introduction to Angularjs : kishan kumarIntroduction to Angularjs : kishan kumar
Introduction to Angularjs : kishan kumarAppfinz Technologies
 
AngularJS Introduction (Talk given on Aug 5 2013)
AngularJS Introduction (Talk given on Aug 5 2013)AngularJS Introduction (Talk given on Aug 5 2013)
AngularJS Introduction (Talk given on Aug 5 2013)Abhishek Anand
 
Angular js
Angular jsAngular js
Angular jsymtech
 
Angular interview questions
Angular interview questionsAngular interview questions
Angular interview questionsGoa App
 

Similar to Everything You Need To Know About AngularJS (20)

Intoduction to Angularjs
Intoduction to AngularjsIntoduction to Angularjs
Intoduction to Angularjs
 
Angular Project Report
 Angular Project Report Angular Project Report
Angular Project Report
 
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
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
introduction to Angularjs basics
introduction to Angularjs basicsintroduction to Angularjs basics
introduction to Angularjs basics
 
Angular Js Get Started - Complete Course
Angular Js Get Started - Complete CourseAngular Js Get Started - Complete Course
Angular Js Get Started - Complete Course
 
Angular workshop - Full Development Guide
Angular workshop - Full Development GuideAngular workshop - Full Development Guide
Angular workshop - Full Development Guide
 
AngularJS Fundamentals + WebAPI
AngularJS Fundamentals + WebAPIAngularJS Fundamentals + WebAPI
AngularJS Fundamentals + WebAPI
 
Overview of the AngularJS framework
Overview of the AngularJS framework Overview of the AngularJS framework
Overview of the AngularJS framework
 
Introduction to Angularjs : kishan kumar
Introduction to Angularjs : kishan kumarIntroduction to Angularjs : kishan kumar
Introduction to Angularjs : kishan kumar
 
Introduction to Angularjs
Introduction to AngularjsIntroduction to Angularjs
Introduction to Angularjs
 
AngularJS Introduction (Talk given on Aug 5 2013)
AngularJS Introduction (Talk given on Aug 5 2013)AngularJS Introduction (Talk given on Aug 5 2013)
AngularJS Introduction (Talk given on Aug 5 2013)
 
Angular js
Angular jsAngular js
Angular js
 
Angular interview questions
Angular interview questionsAngular interview questions
Angular interview questions
 
Angularjs Basics
Angularjs BasicsAngularjs Basics
Angularjs Basics
 
Angular Basics.pptx
Angular Basics.pptxAngular Basics.pptx
Angular Basics.pptx
 
Ng talk
Ng talkNg talk
Ng talk
 
Introduction to Angular Js
Introduction to Angular JsIntroduction to Angular Js
Introduction to Angular Js
 
AngularJS in practice
AngularJS in practiceAngularJS in practice
AngularJS in practice
 
Angular js-crash-course
Angular js-crash-courseAngular js-crash-course
Angular js-crash-course
 

Recently uploaded

Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
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
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
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
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
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...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
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
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

Everything You Need To Know About AngularJS

  • 1. Everything You Need To Know About By Sina Mirhejazi
  • 2. WHAT IS ? ➤ It’s not a JavaScript Library. There is no function which we can directly call and use. ➤ It’s not a DOM manipulation library like jQuery. But it uses subset of jQuery to manipulation (Called jqLite). ➤ Focus more on HTML side of web apps. ➤ For MVC/MVVM design patterns.
  • 3. PHILOSOPHY ➤ Angular is what HTML could have been if it had been designed for applications. ➤ HTML is a great declarative language for static documents. It does not contain much in the way of creating application. ➤ Building web-applications is an exercise in what do I have to do, so that I trick the browser in to do what I want. ➤ Thats why we have frameworks - set of utility functions and libraries for DOM manipulation. ➤ Angular takes another approach. ➤ Angular teaches the browser new syntax.
  • 4. ➤ One way data binding means creating View once and leave Model behind. Whenever we want to change something, we have to change Model and render View again. ➤ Two way data binding link View and Model together and every changes to each one affect another continuously. ➤ How?
  • 5. WHERE THINGS START? ➤ It all starts when you add angular script to your code. THAT SIMPLE!
  • 6. ANGULAR MODULES ➤ Angular works with modules. ➤ Module for main App. ➤ Module for components. ➤ Muddle for everything.
  • 7. ANGULAR CONTROLLERS ➤ We use a Controller to provide data for our Views. ➤ We should not use Controllers to manipulate DOM.
  • 8. DEPENDENCY INJECTION ➤ DI is a way to tell angular which service needs what. ➤ There are several ways to do this.
  • 9. SCOPE ➤ Scope is a link between controller and view. ➤ We can add properties to our $scope object in controllers and get them on view. ➤ More on Scopes later.
  • 10. ANGULAR DIRECTIVES ➤ Directives are out only chance to manipulate DOM. ➤ Directives can teach HTML new stuff. ➤ They can be attributes, classes(!), comments(!) and even tag elements!!! ➤ We seen a couple of them earlier like: ➤ ng-app ➤ ng-controller ➤ ng-repeat ➤ ng-show
  • 11. ANGULAR DIRECTIVES ➤ ng-app ➤ ng-app specify out main module to run the application. ➤ IT goes on <html> tag. ➤ ng-controller ➤ ng-controller link a controller to part of our DOM. ➤ $scope of controller affect the part of DOM that ng-controller linked to. And It’s child of course.
  • 12. ANGULAR DIRECTIVES ➤ ng-repeat ➤ ng-repeat iterate between items of a given object/array. Just like for…in. ➤ ng-show/ng-hide ➤ These twins get an expression and show/hide whether it’s true or false. ➤ ng-if ➤ This one gets an expression and comment/uncomment the element that contains it.
  • 13. ANGULAR DIRECTIVES ➤ ng-click ➤ ng-click get an expression(usually a function) and fire that expression in case of click. ➤ ng-bind ➤ This one is all awesomeness of AngularJS ➤ ng-bind replace text content of it’s tag with a given expression. ➤ AND change it whenever expression change! ➤ It has a little brother named {{expression}}
  • 14. ANGULAR EXPRESSIONS ➤ What is this expression we keep talking about? ➤ Expression is a snippet of JavaScript code, inside HTML tags and attributes. ➤ They live inside HTML tags under the shield of {{}} and in attributes.
  • 15. ANGULAR FILTERS ➤ A filter formats the value of an expression for display to the user. ➤ There are 5 built-in filters and we can write our own filters. ➤ Built-in filters are: ➤ uppercase: Format a string to upper case. ➤ lowercase: Format a string to lower case. ➤ currency: Format a number to a currency format. ➤ orderBy: Orders an array by an expression. ➤ filter: Select a subset of items from an array.
  • 16. SERVICES, FACTORIES AND PROVIDERS ➤ Services, Factories and Providers are for providing data to our application. ➤ They are singletons(unlike controllers that instantiate every time we call them). Which means there is only one instance of specific Factory in whole application. So we can share data between controllers. ➤ There is a slight difference between them. Providers and be configured before application start(some kind of constructor for whole app called config phase). ➤ There are two other type of recipe to define data in AngularJS named ”Value” and ”Constant”. Just to mention.
  • 18. ROUTING AND TEMPLATES ➤ AngularJS can handle routes by using ngRoute module. ➤ We just need to add angular-route script and add ngRoute as a dependency to our app module. ➤ Also some configuration need to be done.
  • 19. JUST A LITTLE BIT MORE ABOUT SCOPES
  • 20. $BROADCAST, $EMIT, $ON ➤ AngularJS has a great way to communicate between different scopes. ➤ A scope can talk to its child through $broadcast. ➤ It can talk to its parents through $emit. ➤ And everyone can listen to their family using $on.
  • 21. ANGULAR RESOURCE ➤ AngularJS needs ngResource module to communicate with server. ➤ Dont forget to add ngResource to app dependencies
  • 22. AngularJS has some great friends to help him grow.
  • 23. RESOURCES ➤ AngularJS Documentation: http://docs.angularjs.org ➤ Some Good Slides: ➤ Everything you need to know to get started http://goo.gl/sqHKdU ➤ AngularJS Basics with Example http://goo.gl/Bh6D9K ➤ Introduction to AngularJS http://goo.gl/524fTR ➤ Angular Style Guide, John Papa https://goo.gl/ft7Vec ➤ Don’t forget to check Youtube for so many good workshop and tutorials