SlideShare ist ein Scribd-Unternehmen logo
1 von 31
AL-Mut'az Bellah Salahat
Senior Software Engineer
TechTalk
Amma/Jordan
v1.3
I play JavaScript
Everywhere
You can find me here :
@msalahat
http://github.com/msalahat
http://fb.me/msalahat
Agenda
• Why we need a modern JS Framework ?
• What is SPA ( Single Page Application )
• What is AngularJS?
• Why Angular is Awesome?
• 2 way data binding
• directives
• Filters
• Views
• Providers
• Routing
Examples of this presentation can be found here :
http://bit.ly/angularjs-tutorial
Why we need a modern JS Framework
• Build more complex web apps
• Enhance User Experience
• Make apps faster.
• Make JS code well structured and maintainable.
• Create SPA.
What is SPA ( Single Page Application ) ?
It's a web application or web site that fits on a single web page
with the goal of providing a more fluid user experience akin to a
desktop application.
SPA Challenges
• Navigation and back button
• Google analytics
• HTML templates
• Code structure
• JavaScript and HTML interaction
What is AngularJS ?
• It's an MVC [or MVW as the creators like to name it ] JS Framework that let's
you build a super awesome singe page applications with minimum effort,
solving all challenges mentioned before.
• You can use angular without any 3rd Party libs.
• Easy to learn.
• Let you built loosely coupled components.
AngularJS App Structure
Why Angular is Awesome?
Two way data binding
RegularWay
Angular Way
• AngularJS expressions are written inside double braces: {{ expression }}.
• AngularJS expressions binds data to HTML.
• AngularJS will "output" data exactly where the expression is written.
• AngularJS expressions are much like JavaScript expressions:They can
contain literals, operators, and variables.
Expressions
• Let’s build a character / word counter tool
They are one of the most powerful feature of AngularJS.They allow you to
extend HTML to answer the needs of web applications. Directives let you
specify how your page should be structured for the data available in a given
scope.
Directives
ng-show
ng-class
ng-repeat
Filters
• Filters are used to manipulate, transform or format data to be viewed
• Filters can be used inside expressions or directives using a pipe.
• Angular has built in list of filters :
• uppercase
• lowercase
• currency
• orderBy
• filter
Controller
• In AngularJS, the controller is where the behavior of your application is
located.
• DOM manipulation should not be done inside a controller.
$scope
• $scope is used to link the controllers and the views to which they are
binded. A controller can add data and function in its scope and then they will
be accessible in the view.
$rootScope
• Its the parent of all $scope(s), its models are accessible by all controllers,
• Any controller can get/set them.
• $scope models overrides $rootScope modes.
Provider
• It is a the piece of code you want to separate of controllers and want o re use
it into another controllers , you can create a provider using 3 recipes:
• Factory
• Service
• Provider
Dependency Injection
Dependency Injection is a software design pattern in which an object is given
its dependencies, rather than the object creating them itself. It is about
removing the hard-coded dependencies and making it possible to change
them whenever needed.
3 ways to specify dependences
3 ways to specify dependences
$routesProvider
• Using the route provider, we can configure the routes [ paths ] available in
our application.
• When using the router provider you do not need to define controllers inside
html using ng-controller.
• You only need to specify the element that Angular will display templates in
using ng-view.
• Each controller is assigned to a template.
• Each controller has a specific path after the # sting in the URL
Angular js 1.3 basic tutorial

Weitere ähnliche Inhalte

Was ist angesagt?

Spring boot - an introduction
Spring boot - an introductionSpring boot - an introduction
Spring boot - an introductionJonathan Holloway
 
Spring I/O 2012: Natural Templating in Spring MVC with Thymeleaf
Spring I/O 2012: Natural Templating in Spring MVC with ThymeleafSpring I/O 2012: Natural Templating in Spring MVC with Thymeleaf
Spring I/O 2012: Natural Templating in Spring MVC with ThymeleafThymeleaf
 
Spring boot
Spring bootSpring boot
Spring bootsdeeg
 
Pentesting Using Burp Suite
Pentesting Using Burp SuitePentesting Using Burp Suite
Pentesting Using Burp Suitejasonhaddix
 
Designing Fault Tolerant APIs to keep Application Network Intact | MuleSoft M...
Designing Fault Tolerant APIs to keep Application Network Intact | MuleSoft M...Designing Fault Tolerant APIs to keep Application Network Intact | MuleSoft M...
Designing Fault Tolerant APIs to keep Application Network Intact | MuleSoft M...MysoreMuleSoftMeetup
 
Basic overview of Angular
Basic overview of AngularBasic overview of Angular
Basic overview of AngularAleksei Bulgak
 
CI CD Jenkins for Swift Deployment
CI CD Jenkins for Swift DeploymentCI CD Jenkins for Swift Deployment
CI CD Jenkins for Swift DeploymentBintang Thunder
 
Workshop Microservices - Construindo APIs RESTful com Spring Boot
Workshop Microservices - Construindo APIs RESTful com Spring BootWorkshop Microservices - Construindo APIs RESTful com Spring Boot
Workshop Microservices - Construindo APIs RESTful com Spring BootRodrigo Cândido da Silva
 
Rest api standards and best practices
Rest api standards and best practicesRest api standards and best practices
Rest api standards and best practicesAnkita Mahajan
 
Rest Security with JAX-RS
Rest Security with JAX-RSRest Security with JAX-RS
Rest Security with JAX-RSFrank Kim
 
Groovy presentation
Groovy presentationGroovy presentation
Groovy presentationManav Prasad
 
Single page applications
Single page applicationsSingle page applications
Single page applicationsDiego Cardozo
 
Swagger With REST APIs.pptx.pdf
Swagger With REST APIs.pptx.pdfSwagger With REST APIs.pptx.pdf
Swagger With REST APIs.pptx.pdfKnoldus Inc.
 

Was ist angesagt? (20)

Swagger
SwaggerSwagger
Swagger
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Spring boot - an introduction
Spring boot - an introductionSpring boot - an introduction
Spring boot - an introduction
 
spring-boot-fr.pdf
spring-boot-fr.pdfspring-boot-fr.pdf
spring-boot-fr.pdf
 
Spring Boot Tutorial
Spring Boot TutorialSpring Boot Tutorial
Spring Boot Tutorial
 
Spring I/O 2012: Natural Templating in Spring MVC with Thymeleaf
Spring I/O 2012: Natural Templating in Spring MVC with ThymeleafSpring I/O 2012: Natural Templating in Spring MVC with Thymeleaf
Spring I/O 2012: Natural Templating in Spring MVC with Thymeleaf
 
Spring boot
Spring bootSpring boot
Spring boot
 
Pentesting Using Burp Suite
Pentesting Using Burp SuitePentesting Using Burp Suite
Pentesting Using Burp Suite
 
Designing Fault Tolerant APIs to keep Application Network Intact | MuleSoft M...
Designing Fault Tolerant APIs to keep Application Network Intact | MuleSoft M...Designing Fault Tolerant APIs to keep Application Network Intact | MuleSoft M...
Designing Fault Tolerant APIs to keep Application Network Intact | MuleSoft M...
 
Basic overview of Angular
Basic overview of AngularBasic overview of Angular
Basic overview of Angular
 
Geb with spock
Geb with spockGeb with spock
Geb with spock
 
CI CD Jenkins for Swift Deployment
CI CD Jenkins for Swift DeploymentCI CD Jenkins for Swift Deployment
CI CD Jenkins for Swift Deployment
 
Workshop Microservices - Construindo APIs RESTful com Spring Boot
Workshop Microservices - Construindo APIs RESTful com Spring BootWorkshop Microservices - Construindo APIs RESTful com Spring Boot
Workshop Microservices - Construindo APIs RESTful com Spring Boot
 
Introducing AWS Device Farm
Introducing AWS Device FarmIntroducing AWS Device Farm
Introducing AWS Device Farm
 
Rest api standards and best practices
Rest api standards and best practicesRest api standards and best practices
Rest api standards and best practices
 
Rest Security with JAX-RS
Rest Security with JAX-RSRest Security with JAX-RS
Rest Security with JAX-RS
 
Groovy presentation
Groovy presentationGroovy presentation
Groovy presentation
 
Single page applications
Single page applicationsSingle page applications
Single page applications
 
Swagger With REST APIs.pptx.pdf
Swagger With REST APIs.pptx.pdfSwagger With REST APIs.pptx.pdf
Swagger With REST APIs.pptx.pdf
 

Ähnlich wie Angular js 1.3 basic tutorial

Intoduction to Angularjs
Intoduction to AngularjsIntoduction to Angularjs
Intoduction to AngularjsGaurav Agrawal
 
Angular JS - Introduction
Angular JS - IntroductionAngular JS - Introduction
Angular JS - IntroductionSagar Acharya
 
Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5Ganesh Kondal
 
Angular patterns
Angular patternsAngular patterns
Angular patternsPremkumar M
 
AngularJs (1.x) Presentation
AngularJs (1.x) PresentationAngularJs (1.x) Presentation
AngularJs (1.x) PresentationRaghubir Singh
 
Introduction to Angularjs : kishan kumar
Introduction to Angularjs : kishan kumarIntroduction to Angularjs : kishan kumar
Introduction to Angularjs : kishan kumarAppfinz Technologies
 
4 Anguadasdfasdasdfasdfsdfasdfaslar (1).pptx
4 Anguadasdfasdasdfasdfsdfasdfaslar (1).pptx4 Anguadasdfasdasdfasdfsdfasdfaslar (1).pptx
4 Anguadasdfasdasdfasdfsdfasdfaslar (1).pptxtilejak773
 
A perfect choice for web apps
A perfect choice for web apps A perfect choice for web apps
A perfect choice for web apps adhyathakkar10
 
Angular JS, A dive to concepts
Angular JS, A dive to conceptsAngular JS, A dive to concepts
Angular JS, A dive to conceptsAbhishek Sur
 
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
 

Ähnlich wie Angular js 1.3 basic tutorial (20)

Angularjs basic part01
Angularjs basic part01Angularjs basic part01
Angularjs basic part01
 
AngularJS is awesome
AngularJS is awesomeAngularJS is awesome
AngularJS is awesome
 
Intoduction to Angularjs
Intoduction to AngularjsIntoduction to Angularjs
Intoduction to Angularjs
 
Angular JS - Introduction
Angular JS - IntroductionAngular JS - Introduction
Angular JS - Introduction
 
Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5
 
Angular patterns
Angular patternsAngular patterns
Angular patterns
 
AngularJs (1.x) Presentation
AngularJs (1.x) PresentationAngularJs (1.x) Presentation
AngularJs (1.x) Presentation
 
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
 
Module2
Module2Module2
Module2
 
4 Anguadasdfasdasdfasdfsdfasdfaslar (1).pptx
4 Anguadasdfasdasdfasdfsdfasdfaslar (1).pptx4 Anguadasdfasdasdfasdfsdfasdfaslar (1).pptx
4 Anguadasdfasdasdfasdfsdfasdfaslar (1).pptx
 
JavaScript MVC Frameworks: Backbone, Ember and Angular JS
JavaScript MVC Frameworks: Backbone, Ember and Angular JSJavaScript MVC Frameworks: Backbone, Ember and Angular JS
JavaScript MVC Frameworks: Backbone, Ember and Angular JS
 
Wt unit 5 client & server side framework
Wt unit 5 client & server side frameworkWt unit 5 client & server side framework
Wt unit 5 client & server side framework
 
A perfect choice for web apps
A perfect choice for web apps A perfect choice for web apps
A perfect choice for web apps
 
Introduction to Angular Js
Introduction to Angular JsIntroduction to Angular Js
Introduction to Angular Js
 
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
 
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
 
Anjular js
Anjular jsAnjular js
Anjular js
 
AngularJS
AngularJSAngularJS
AngularJS
 

Kürzlich hochgeladen

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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
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
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
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
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
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 TerraformAndrey Devyatkin
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 

Kürzlich hochgeladen (20)

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)
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
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
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
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
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 

Angular js 1.3 basic tutorial

  • 1. AL-Mut'az Bellah Salahat Senior Software Engineer TechTalk Amma/Jordan v1.3
  • 2. I play JavaScript Everywhere You can find me here : @msalahat http://github.com/msalahat http://fb.me/msalahat
  • 3. Agenda • Why we need a modern JS Framework ? • What is SPA ( Single Page Application ) • What is AngularJS? • Why Angular is Awesome? • 2 way data binding • directives • Filters • Views • Providers • Routing
  • 4. Examples of this presentation can be found here : http://bit.ly/angularjs-tutorial
  • 5. Why we need a modern JS Framework • Build more complex web apps • Enhance User Experience • Make apps faster. • Make JS code well structured and maintainable. • Create SPA.
  • 6. What is SPA ( Single Page Application ) ? It's a web application or web site that fits on a single web page with the goal of providing a more fluid user experience akin to a desktop application.
  • 7. SPA Challenges • Navigation and back button • Google analytics • HTML templates • Code structure • JavaScript and HTML interaction
  • 8. What is AngularJS ? • It's an MVC [or MVW as the creators like to name it ] JS Framework that let's you build a super awesome singe page applications with minimum effort, solving all challenges mentioned before. • You can use angular without any 3rd Party libs. • Easy to learn. • Let you built loosely coupled components.
  • 10. Why Angular is Awesome? Two way data binding RegularWay
  • 12. • AngularJS expressions are written inside double braces: {{ expression }}. • AngularJS expressions binds data to HTML. • AngularJS will "output" data exactly where the expression is written. • AngularJS expressions are much like JavaScript expressions:They can contain literals, operators, and variables. Expressions
  • 13. • Let’s build a character / word counter tool
  • 14. They are one of the most powerful feature of AngularJS.They allow you to extend HTML to answer the needs of web applications. Directives let you specify how your page should be structured for the data available in a given scope. Directives ng-show
  • 17. Filters • Filters are used to manipulate, transform or format data to be viewed • Filters can be used inside expressions or directives using a pipe. • Angular has built in list of filters : • uppercase • lowercase • currency • orderBy • filter
  • 18.
  • 19. Controller • In AngularJS, the controller is where the behavior of your application is located. • DOM manipulation should not be done inside a controller.
  • 20. $scope • $scope is used to link the controllers and the views to which they are binded. A controller can add data and function in its scope and then they will be accessible in the view.
  • 21. $rootScope • Its the parent of all $scope(s), its models are accessible by all controllers, • Any controller can get/set them. • $scope models overrides $rootScope modes.
  • 22. Provider • It is a the piece of code you want to separate of controllers and want o re use it into another controllers , you can create a provider using 3 recipes: • Factory • Service • Provider
  • 23.
  • 24. Dependency Injection Dependency Injection is a software design pattern in which an object is given its dependencies, rather than the object creating them itself. It is about removing the hard-coded dependencies and making it possible to change them whenever needed.
  • 25. 3 ways to specify dependences
  • 26. 3 ways to specify dependences
  • 27.
  • 28.
  • 29. $routesProvider • Using the route provider, we can configure the routes [ paths ] available in our application.
  • 30. • When using the router provider you do not need to define controllers inside html using ng-controller. • You only need to specify the element that Angular will display templates in using ng-view. • Each controller is assigned to a template. • Each controller has a specific path after the # sting in the URL

Hinweis der Redaktion

  1. 1. Try to add print a variable outside the controller scope 2. Show multiple controllers example
  2. Show $rootScope example
  3. config-service.html example