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

PDF
Angular, the New Angular JS
PDF
Angular Directives | Angular 2 Custom Directives | Angular Tutorial | Angular...
PDF
Angular Meetup 1 - Angular Basics and Workshop
PDF
What's New in Angular 4 | Angular 4 Features | Angular 4 Changes | Angular Tu...
PDF
Angular 2 Training | Angular 2 Tutorial For Beginners | Angular Certification...
PDF
Angular 4 Tutorial | What's New In Angular 4 | Angular Training | Edureka
PPTX
Angular 4 Introduction Tutorial
PPSX
Angular 4 fronts
Angular, the New Angular JS
Angular Directives | Angular 2 Custom Directives | Angular Tutorial | Angular...
Angular Meetup 1 - Angular Basics and Workshop
What's New in Angular 4 | Angular 4 Features | Angular 4 Changes | Angular Tu...
Angular 2 Training | Angular 2 Tutorial For Beginners | Angular Certification...
Angular 4 Tutorial | What's New In Angular 4 | Angular Training | Edureka
Angular 4 Introduction Tutorial
Angular 4 fronts

What's hot (20)

PDF
What angular 13 will bring to the table
PPTX
Angular 2
PPTX
Introduction to angular 2
ODP
Angular 6 - The Complete Guide
PPTX
Talk for DevFest 2021 - GDG Bénin
PPTX
PDF
Developing a Demo Application with Angular 4 - J2I
PDF
Angular 2 - Core Concepts
PDF
What is Angular version 4?
PDF
Angular2 intro
PPTX
PDF
Mastering angular - Dot Net Tricks
PDF
Angular Routing Tutorial | AngularJS vs Angular Router | Angular Training | E...
PPTX
Go live with angular 4
PDF
Angular 2 Examples | Angular CRUD Application | Angular Tutorial | Angular Tr...
PPTX
Angular 4 - quick view
PDF
Introduction to angular 2
PPTX
Angular 9
PDF
Angular 2: What's New?
PDF
Quick introduction to Angular 4 for AngularJS 1.5 developers
What angular 13 will bring to the table
Angular 2
Introduction to angular 2
Angular 6 - The Complete Guide
Talk for DevFest 2021 - GDG Bénin
Developing a Demo Application with Angular 4 - J2I
Angular 2 - Core Concepts
What is Angular version 4?
Angular2 intro
Mastering angular - Dot Net Tricks
Angular Routing Tutorial | AngularJS vs Angular Router | Angular Training | E...
Go live with angular 4
Angular 2 Examples | Angular CRUD Application | Angular Tutorial | Angular Tr...
Angular 4 - quick view
Introduction to angular 2
Angular 9
Angular 2: What's New?
Quick introduction to Angular 4 for AngularJS 1.5 developers
Ad

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

PPTX
Angularjs basic part01
PPTX
AngularJS is awesome
PPTX
Angular js anupama
PPTX
Benefits of developing single page web applications using angular js
PPTX
Introduction_to_AngularJS............pptx
PDF
Introduction to Angular Js
PPTX
Module2
PPTX
Learning AngularJS - Complete coverage of AngularJS features and concepts
PPTX
Angular patterns
PPTX
AngularJs (1.x) Presentation
PPTX
Spring Web Presentation 123143242341234234
PPTX
Comparing Angular and React JS for SPAs
PPTX
Introduction to-angular js
PPTX
Angular js- 1.X
PPTX
MVC Framework
PDF
Angular JS tutorial
PPTX
JavaScript MVC Frameworks: Backbone, Ember and Angular JS
PDF
React vs Angular - Which is best JS Framework for Front-end Development
PDF
The future of web development write once, run everywhere with angular js an...
Angularjs basic part01
AngularJS is awesome
Angular js anupama
Benefits of developing single page web applications using angular js
Introduction_to_AngularJS............pptx
Introduction to Angular Js
Module2
Learning AngularJS - Complete coverage of AngularJS features and concepts
Angular patterns
AngularJs (1.x) Presentation
Spring Web Presentation 123143242341234234
Comparing Angular and React JS for SPAs
Introduction to-angular js
Angular js- 1.X
MVC Framework
Angular JS tutorial
JavaScript MVC Frameworks: Backbone, Ember and Angular JS
React vs Angular - Which is best JS Framework for Front-end Development
The future of web development write once, run everywhere with angular js an...
Ad

More from Edureka! (20)

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

Recently uploaded (20)

PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Approach and Philosophy of On baking technology
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Encapsulation theory and applications.pdf
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
cuic standard and advanced reporting.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Approach and Philosophy of On baking technology
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Encapsulation theory and applications.pdf
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
The AUB Centre for AI in Media Proposal.docx
Building Integrated photovoltaic BIPV_UPV.pdf
cuic standard and advanced reporting.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Encapsulation_ Review paper, used for researhc scholars
Mobile App Security Testing_ A Comprehensive Guide.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Review of recent advances in non-invasive hemoglobin estimation
“AI and Expert System Decision Support & Business Intelligence Systems”
Diabetes mellitus diagnosis method based random forest with bat algorithm
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Agricultural_Statistics_at_a_Glance_2022_0.pdf

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