SlideShare a Scribd company logo
What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edureka
www.edureka.co/angular-js
Agenda
❖ Evolution of Web Development
❖ What is AngularJS ?
❖ Angular 2 and It’s Architecture
❖ Components of Angular 2
❖ Your First Angular 2 program
www.edureka.co/angular-js
Challenges of Web Development
www.edureka.co/angular-js
Evolution of Web Development
• Client-side scripting is executed on the client’s browser instead of the web-server
• It alleviates some of the burden on your web server when running a web application.
• It can be used for page navigation, data validation and formatting.
>Client-side
processing
Less Server
overhead
Request>
Response
www.edureka.co/angular-js
Evolution of Web Development
• JQuery is a specific library of JavaScript code.
• It is a DOM manipulation library that makes it easier to use JavaScript on your website.
• jQuery wraps the complex code into simple methods whether it required to make AJAX calls or manipulate the DOM.
>
www.edureka.co/angular-js
Evolution of Web Development
• JQuery has no real structure, the developer has full freedom to build projects as they see fit.
• But the lack of structure can lead to confusion on larger projects with no clear design direction or code maintainability.
For these situations, a framework like AngularJS can be a big help.
www.edureka.co/angular-js
What is AngularJS ?
www.edureka.co/angular-js
AngularJS Introduction
• AngularJS was developed in 2009 by Misko Hevery and Adam Abrons
at Brat Tech LLC.
• It is a open source JavaScript client-side framework maintained by
Google and a group of developers and enterprises
www.edureka.co/angular-js
What is AngularJS?
• Client side JavaScript framework to develop a dynamic web application
• Help developers build SPAs in accordance with best practices for web development
• Data binding and dependency injection eliminate much of the code you would otherwise have to write
• Extends HTML attributes with Directives, and binds data to HTML with Expressions
www.edureka.co/angular-js
AngularJS - Manipulating DOM
• Traditionally, the view modifies the DOM to present data and manipulates the DOM (or invokes jQuery) to add behaviour
• AngularJS puts all the DOM manipulation code into directives, thus easily separating that code out from the view and making it
available as standalone reusable units
View DOM
manipulation
View DOM
manipulation
Directives
www.edureka.co/angular-js
Single Page Application
www.edureka.co/angular-js
Single Page Application
A Single Page Application is a web application that requires only a single page load in a web browser.
• Your browser fully renders the DOM a single time.
• After this, background JavaScript performs any server
interactions and modifies the view as needed.
Navigation Bar
CoursesSide Bar
{ }
{ } { }
www.edureka.co/angular-js
Angular 2.0
www.edureka.co/angular-js
Angular 2
Mobile development
Desktop development is much easier when mobile
performance issues are handled first
Modularity
Much core functionality has moved to modules,
producing a lighter, faster core
www.edureka.co/angular-js
Angular 2
Using TypeScript
Class-based Object Oriented Programming, Static
Typing, Generics, Lambdas
ECMAScript 6
Iterators, For/Of loops, Python-style
generators, Reflection
www.edureka.co/angular-js
Architecture Angular 2.0
www.edureka.co/angular-js
Architecture
Template
< >
Injectors
Directives
{ }
Components
{ }
Module
Components
{ }
Module
Service
{ }
Module
Fn
ƛ
Module
Value
3.14
Services
{ }
Property
Binding
Event
Binding
Metadata
Metadata
www.edureka.co/angular-js
Main Building Blocks Of Angular 2
Components
Modules
Templates
Metadata
Services
Data Binding
Directives
Dependency Injection
www.edureka.co/angular-js
Building Blocks - Components
Templates
Metadata
Services
Data binding
Components1
3
4
5
6
Directives7
Modules2
Dependency
Injection
8
• Encapsulates the template, data and the behaviour of a view
{ }
{ } { }
{ } { } { }
Root Component
www.edureka.co/angular-js
Building Blocks - Components
Templates
Metadata
Services
Data binding
Components1
3
4
5
6
Directives7
Modules2
Dependency
Injection
8
www.edureka.co/angular-js
Building Blocks - Components
Templates
Metadata
Services
Data binding
Components1
3
4
5
6
Directives7
Modules2
Dependency
Injection
8
Navigation Bar
Side Bar
{ }
{ }
Course1
Course3
Course4
Course2
{ }
{ }
{ }
{ }
www.edureka.co/angular-js
Building Blocks - Components
Templates
Metadata
Services
Data binding
Components1
3
4
5
6
Directives7
Modules2
Dependency
Injection
8
Edureka
Nav bar
Course
Side BarCourses
www.edureka.co/angular-js
Building Blocks - Modules
Templates
Metadata
Services
Data binding
Components1
3
4
5
6
Directives7
Modules2
Dependency
Injection
8
• A cohesive block of code dedicated to an application domain, a workflow, or a
closely related set of capabilities
• Every Angular app has at least one Angular module class, the root module
(AppModule)
• An Angular module, whether a root or feature, is a class with
an @NgModule decorator
Module:
Templates
< >
Directives
{ }
Components
{ }
Services
{ }
www.edureka.co/angular-js
Building Blocks - Templates
Templates
Metadata
Services
Data binding
Components1
3
4
5
6
Directives7
Modules2
Dependency
Injection
8
Root
Component
{ }
Root
Template
< >
Child B
Component
{ }
Child B
Template
< >
Child A
Component
{ }
Child A
Template
< >
• You define a component's view with its companion template
• A template is a form of HTML that tells Angular how to render the component
• Although this template uses typical HTML elements but it also uses Angular's template syntax
www.edureka.co/angular-js
Building Blocks - Metadata
Templates
Metadata
Services
Data binding
Components1
3
4
5
6
Directives7
Modules2
Dependency
Injection
8
• Metadata tells Angular how to process a class
• In TypeScript, you attach metadata by using a decorator
• The template, metadata, and component together describe a view
Components
{ }
Template
< >
Metadata
www.edureka.co/angular-js
Building Blocks - Services
Templates
Metadata
Services
Data binding
Components1
3
4
5
6
Directives7
Modules2
Dependency
Injection
8
• Service is a plain class that encapsulates any non logic not related to view
• Examples include - logging service, data service, tax calculator etc.
• Service accomplishes tasks that fetch data from the server, validate user input, or log directly
to the console
{ }
Data Access
Logging
Business Logic
Configuration
COMPONENTS SERVICES {
www.edureka.co/angular-js
Building Blocks – Data Binding
Templates
Metadata
Services
Data binding
Components1
3
4
5
6
Directives7
Modules2
Dependency
Injection
8
• Responsible for pushing data values into the HTML controls
and turning user responses into actions and value updates
• The three forms of binding:
• Interpolation
• Property binding
• Event binding
NOTE :
• In two-way binding, a data property value flows to the view from the
component as with property binding
• The user's changes also flow back to the component, resetting the property to
the latest value, as with event binding
Components
{ }
Template
< >
Property
Binding
Event
BindingMetadata
www.edureka.co/angular-js
Building Blocks – Directives
Templates
Metadata
Services
Data binding
Components1
3
4
5
6
Directives7
Modules2
Dependency
Injection
8
• Modify DOM elements and modify their Behaviours
• Built-in directives helps in -
• Extend or control DOM
• Adding classes
• And much more …
• You can also write your own directives
www.edureka.co/angular-js
Building Blocks – Dependency Injection
Templates
Metadata
Services
Data binding
Components1
3
4
5
6
Directives7
Modules2
Dependency Injection8
• A way to supply a new instance of a class with the fully-formed dependencies it requires
like services
• Provide new components with the services they need
• An injector can create a new service instance from a provider
Service
Instances
Class
www.edureka.co/angular-js
Your First Angular 2 program
www.edureka.co/angular-js
Put on your Angular Glass
www.edureka.co/angular-js
Thank You …
Questions/Queries/Feedback

More Related Content

What's hot (20)

PDF
What angular 13 will bring to the table
Moon Technolabs Pvt. Ltd.
 
PPTX
Angular 2
Nigam Goyal
 
PPTX
Introduction to angular 2
Dor Moshe
 
ODP
Angular 6 - The Complete Guide
Sam Dias
 
PPTX
Talk for DevFest 2021 - GDG Bénin
Ezéchiel Amen AGBLA
 
PPTX
Angular 2
Travis van der Font
 
PDF
Developing a Demo Application with Angular 4 - J2I
Nader Debbabi
 
PDF
Angular 2 - Core Concepts
Fabio Biondi
 
PDF
What is Angular version 4?
Troy Miles
 
PDF
Angular2 intro
Shawn McKay
 
PPTX
An Overview of Angular 4
Cynoteck Technology Solutions Private Limited
 
PDF
Mastering angular - Dot Net Tricks
Gaurav Singh
 
PDF
Angular Routing Tutorial | AngularJS vs Angular Router | Angular Training | E...
Edureka!
 
PPTX
Go live with angular 4
Indra Gunawan
 
PDF
Angular 2 Examples | Angular CRUD Application | Angular Tutorial | Angular Tr...
Edureka!
 
PPTX
Angular 4 - quick view
Michael Haberman
 
PDF
Introduction to angular 2
Dhyego Fernando
 
PPTX
Angular 9
Raja Vishnu
 
PDF
Angular 2: What's New?
jbandi
 
PDF
Quick introduction to Angular 4 for AngularJS 1.5 developers
Paweł Żurowski
 
What angular 13 will bring to the table
Moon Technolabs Pvt. Ltd.
 
Angular 2
Nigam Goyal
 
Introduction to angular 2
Dor Moshe
 
Angular 6 - The Complete Guide
Sam Dias
 
Talk for DevFest 2021 - GDG Bénin
Ezéchiel Amen AGBLA
 
Developing a Demo Application with Angular 4 - J2I
Nader Debbabi
 
Angular 2 - Core Concepts
Fabio Biondi
 
What is Angular version 4?
Troy Miles
 
Angular2 intro
Shawn McKay
 
Mastering angular - Dot Net Tricks
Gaurav Singh
 
Angular Routing Tutorial | AngularJS vs Angular Router | Angular Training | E...
Edureka!
 
Go live with angular 4
Indra Gunawan
 
Angular 2 Examples | Angular CRUD Application | Angular Tutorial | Angular Tr...
Edureka!
 
Angular 4 - quick view
Michael Haberman
 
Introduction to angular 2
Dhyego Fernando
 
Angular 9
Raja Vishnu
 
Angular 2: What's New?
jbandi
 
Quick introduction to Angular 4 for AngularJS 1.5 developers
Paweł Żurowski
 

Similar to What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edureka (20)

PDF
Getting Started With AngularJS
Edureka!
 
PDF
AngularJS for Beginners
Edureka!
 
PDF
Getting Started with AngularJS
Edureka!
 
PPTX
Angular patterns
Premkumar M
 
PDF
AngularJS : Superheroic Javascript MVW Framework
Edureka!
 
PDF
Angular JS - Develop Responsive Single Page Application
Edureka!
 
PDF
Webinar on Angular JS titled 'Develop Responsive Single Page Application'
Edureka!
 
PPTX
ME vs WEB - AngularJS Fundamentals
Aviran Cohen
 
PDF
AngularJS : Superheroic JavaScript MVW Framework
Edureka!
 
PPTX
Intro to AngularJs
SolTech, Inc.
 
PPTX
Valentine with Angular js - Introduction
Senthil Kumar
 
PPTX
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
murtazahaveliwala
 
PPTX
Training On Angular Js
Mahima Radhakrishnan
 
PDF
Everything You Need To Know About AngularJS
Sina Mirhejazi
 
PPTX
Reason to choose Angular JS for your Web Application
Priyanka Verma
 
PDF
Deep Dive into AngularJS Javascript Framework
Edureka!
 
PDF
An Implementation Tour to AngularJS
rahulmonikasharma
 
PPTX
AngularJS Introduction
Brajesh Yadav
 
PPTX
Kalp Corporate Angular Js Tutorials
Kalp Corporate
 
Getting Started With AngularJS
Edureka!
 
AngularJS for Beginners
Edureka!
 
Getting Started with AngularJS
Edureka!
 
Angular patterns
Premkumar M
 
AngularJS : Superheroic Javascript MVW Framework
Edureka!
 
Angular JS - Develop Responsive Single Page Application
Edureka!
 
Webinar on Angular JS titled 'Develop Responsive Single Page Application'
Edureka!
 
ME vs WEB - AngularJS Fundamentals
Aviran Cohen
 
AngularJS : Superheroic JavaScript MVW Framework
Edureka!
 
Intro to AngularJs
SolTech, Inc.
 
Valentine with Angular js - Introduction
Senthil Kumar
 
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
murtazahaveliwala
 
Training On Angular Js
Mahima Radhakrishnan
 
Everything You Need To Know About AngularJS
Sina Mirhejazi
 
Reason to choose Angular JS for your Web Application
Priyanka Verma
 
Deep Dive into AngularJS Javascript Framework
Edureka!
 
An Implementation Tour to AngularJS
rahulmonikasharma
 
AngularJS Introduction
Brajesh Yadav
 
Kalp Corporate Angular Js Tutorials
Kalp Corporate
 
Ad

More from Edureka! (20)

PDF
What to learn during the 21 days Lockdown | Edureka
Edureka!
 
PDF
Top 10 Dying Programming Languages in 2020 | Edureka
Edureka!
 
PDF
Top 5 Trending Business Intelligence Tools | Edureka
Edureka!
 
PDF
Tableau Tutorial for Data Science | Edureka
Edureka!
 
PDF
Python Programming Tutorial | Edureka
Edureka!
 
PDF
Top 5 PMP Certifications | Edureka
Edureka!
 
PDF
Top Maven Interview Questions in 2020 | Edureka
Edureka!
 
PDF
Linux Mint Tutorial | Edureka
Edureka!
 
PDF
How to Deploy Java Web App in AWS| Edureka
Edureka!
 
PDF
Importance of Digital Marketing | Edureka
Edureka!
 
PDF
RPA in 2020 | Edureka
Edureka!
 
PDF
Email Notifications in Jenkins | Edureka
Edureka!
 
PDF
EA Algorithm in Machine Learning | Edureka
Edureka!
 
PDF
Cognitive AI Tutorial | Edureka
Edureka!
 
PDF
AWS Cloud Practitioner Tutorial | Edureka
Edureka!
 
PDF
Blue Prism Top Interview Questions | Edureka
Edureka!
 
PDF
Big Data on AWS Tutorial | Edureka
Edureka!
 
PDF
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
Edureka!
 
PDF
Kubernetes Installation on Ubuntu | Edureka
Edureka!
 
PDF
Introduction to DevOps | Edureka
Edureka!
 
What to learn during the 21 days Lockdown | Edureka
Edureka!
 
Top 10 Dying Programming Languages in 2020 | Edureka
Edureka!
 
Top 5 Trending Business Intelligence Tools | Edureka
Edureka!
 
Tableau Tutorial for Data Science | Edureka
Edureka!
 
Python Programming Tutorial | Edureka
Edureka!
 
Top 5 PMP Certifications | Edureka
Edureka!
 
Top Maven Interview Questions in 2020 | Edureka
Edureka!
 
Linux Mint Tutorial | Edureka
Edureka!
 
How to Deploy Java Web App in AWS| Edureka
Edureka!
 
Importance of Digital Marketing | Edureka
Edureka!
 
RPA in 2020 | Edureka
Edureka!
 
Email Notifications in Jenkins | Edureka
Edureka!
 
EA Algorithm in Machine Learning | Edureka
Edureka!
 
Cognitive AI Tutorial | Edureka
Edureka!
 
AWS Cloud Practitioner Tutorial | Edureka
Edureka!
 
Blue Prism Top Interview Questions | Edureka
Edureka!
 
Big Data on AWS Tutorial | Edureka
Edureka!
 
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
Edureka!
 
Kubernetes Installation on Ubuntu | Edureka
Edureka!
 
Introduction to DevOps | Edureka
Edureka!
 
Ad

Recently uploaded (20)

PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PPTX
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
Python basic programing language for automation
DanialHabibi2
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PPTX
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
Python basic programing language for automation
DanialHabibi2
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 

What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edureka

  • 2. www.edureka.co/angular-js Agenda ❖ Evolution of Web Development ❖ What is AngularJS ? ❖ Angular 2 and It’s Architecture ❖ Components of Angular 2 ❖ Your First Angular 2 program
  • 4. www.edureka.co/angular-js Evolution of Web Development • Client-side scripting is executed on the client’s browser instead of the web-server • It alleviates some of the burden on your web server when running a web application. • It can be used for page navigation, data validation and formatting. >Client-side processing Less Server overhead Request> Response
  • 5. www.edureka.co/angular-js Evolution of Web Development • JQuery is a specific library of JavaScript code. • It is a DOM manipulation library that makes it easier to use JavaScript on your website. • jQuery wraps the complex code into simple methods whether it required to make AJAX calls or manipulate the DOM. >
  • 6. www.edureka.co/angular-js Evolution of Web Development • JQuery has no real structure, the developer has full freedom to build projects as they see fit. • But the lack of structure can lead to confusion on larger projects with no clear design direction or code maintainability. For these situations, a framework like AngularJS can be a big help.
  • 8. www.edureka.co/angular-js AngularJS Introduction • AngularJS was developed in 2009 by Misko Hevery and Adam Abrons at Brat Tech LLC. • It is a open source JavaScript client-side framework maintained by Google and a group of developers and enterprises
  • 9. www.edureka.co/angular-js What is AngularJS? • Client side JavaScript framework to develop a dynamic web application • Help developers build SPAs in accordance with best practices for web development • Data binding and dependency injection eliminate much of the code you would otherwise have to write • Extends HTML attributes with Directives, and binds data to HTML with Expressions
  • 10. www.edureka.co/angular-js AngularJS - Manipulating DOM • Traditionally, the view modifies the DOM to present data and manipulates the DOM (or invokes jQuery) to add behaviour • AngularJS puts all the DOM manipulation code into directives, thus easily separating that code out from the view and making it available as standalone reusable units View DOM manipulation View DOM manipulation Directives
  • 12. www.edureka.co/angular-js Single Page Application A Single Page Application is a web application that requires only a single page load in a web browser. • Your browser fully renders the DOM a single time. • After this, background JavaScript performs any server interactions and modifies the view as needed. Navigation Bar CoursesSide Bar { } { } { }
  • 14. www.edureka.co/angular-js Angular 2 Mobile development Desktop development is much easier when mobile performance issues are handled first Modularity Much core functionality has moved to modules, producing a lighter, faster core
  • 15. www.edureka.co/angular-js Angular 2 Using TypeScript Class-based Object Oriented Programming, Static Typing, Generics, Lambdas ECMAScript 6 Iterators, For/Of loops, Python-style generators, Reflection
  • 17. www.edureka.co/angular-js Architecture Template < > Injectors Directives { } Components { } Module Components { } Module Service { } Module Fn ƛ Module Value 3.14 Services { } Property Binding Event Binding Metadata Metadata
  • 18. www.edureka.co/angular-js Main Building Blocks Of Angular 2 Components Modules Templates Metadata Services Data Binding Directives Dependency Injection
  • 19. www.edureka.co/angular-js Building Blocks - Components Templates Metadata Services Data binding Components1 3 4 5 6 Directives7 Modules2 Dependency Injection 8 • Encapsulates the template, data and the behaviour of a view { } { } { } { } { } { } Root Component
  • 20. www.edureka.co/angular-js Building Blocks - Components Templates Metadata Services Data binding Components1 3 4 5 6 Directives7 Modules2 Dependency Injection 8
  • 21. www.edureka.co/angular-js Building Blocks - Components Templates Metadata Services Data binding Components1 3 4 5 6 Directives7 Modules2 Dependency Injection 8 Navigation Bar Side Bar { } { } Course1 Course3 Course4 Course2 { } { } { } { }
  • 22. www.edureka.co/angular-js Building Blocks - Components Templates Metadata Services Data binding Components1 3 4 5 6 Directives7 Modules2 Dependency Injection 8 Edureka Nav bar Course Side BarCourses
  • 23. www.edureka.co/angular-js Building Blocks - Modules Templates Metadata Services Data binding Components1 3 4 5 6 Directives7 Modules2 Dependency Injection 8 • A cohesive block of code dedicated to an application domain, a workflow, or a closely related set of capabilities • Every Angular app has at least one Angular module class, the root module (AppModule) • An Angular module, whether a root or feature, is a class with an @NgModule decorator Module: Templates < > Directives { } Components { } Services { }
  • 24. www.edureka.co/angular-js Building Blocks - Templates Templates Metadata Services Data binding Components1 3 4 5 6 Directives7 Modules2 Dependency Injection 8 Root Component { } Root Template < > Child B Component { } Child B Template < > Child A Component { } Child A Template < > • You define a component's view with its companion template • A template is a form of HTML that tells Angular how to render the component • Although this template uses typical HTML elements but it also uses Angular's template syntax
  • 25. www.edureka.co/angular-js Building Blocks - Metadata Templates Metadata Services Data binding Components1 3 4 5 6 Directives7 Modules2 Dependency Injection 8 • Metadata tells Angular how to process a class • In TypeScript, you attach metadata by using a decorator • The template, metadata, and component together describe a view Components { } Template < > Metadata
  • 26. www.edureka.co/angular-js Building Blocks - Services Templates Metadata Services Data binding Components1 3 4 5 6 Directives7 Modules2 Dependency Injection 8 • Service is a plain class that encapsulates any non logic not related to view • Examples include - logging service, data service, tax calculator etc. • Service accomplishes tasks that fetch data from the server, validate user input, or log directly to the console { } Data Access Logging Business Logic Configuration COMPONENTS SERVICES {
  • 27. www.edureka.co/angular-js Building Blocks – Data Binding Templates Metadata Services Data binding Components1 3 4 5 6 Directives7 Modules2 Dependency Injection 8 • Responsible for pushing data values into the HTML controls and turning user responses into actions and value updates • The three forms of binding: • Interpolation • Property binding • Event binding NOTE : • In two-way binding, a data property value flows to the view from the component as with property binding • The user's changes also flow back to the component, resetting the property to the latest value, as with event binding Components { } Template < > Property Binding Event BindingMetadata
  • 28. www.edureka.co/angular-js Building Blocks – Directives Templates Metadata Services Data binding Components1 3 4 5 6 Directives7 Modules2 Dependency Injection 8 • Modify DOM elements and modify their Behaviours • Built-in directives helps in - • Extend or control DOM • Adding classes • And much more … • You can also write your own directives
  • 29. www.edureka.co/angular-js Building Blocks – Dependency Injection Templates Metadata Services Data binding Components1 3 4 5 6 Directives7 Modules2 Dependency Injection8 • A way to supply a new instance of a class with the fully-formed dependencies it requires like services • Provide new components with the services they need • An injector can create a new service instance from a provider Service Instances Class