SlideShare a Scribd company logo
Introduction to Angular2
- Akshay Rana
- Software Consultant
(Knoldus Software LLP)
Agenda
● INTRODUCTION
● ARCHITECTURE
○ Components
○ Templates
○ Modules
○ Metadata
○ Data Binding
○ Directives
○ Services
○ Dependency Injection
Introduction
● Angular 2 is the next version of Google’s massively popular
MVC framework for building complex single page applications
in the browser (and beyond).
● A faster, more powerful, cleaner, and easier to use tool than
we had with Angular 1.​
ARCHITECTURE
Components
● A component controls a patch of screen called a view.
● Angular creates, updates, and destroys components as the
user moves through the application. Your app can take action
at each moment in this lifecycle through optional lifecycle
hooks.
● @Component //decorator
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.
Modules
● Angular apps are modular and Angular has its own modularity
system called Angular modules or NgModules.
● Every Angular app has at least one Angular module class, the
root module.
● While the root module may be the only module in a small
application, most apps have many more feature modules.
● @NgModule //decorator
Metadata
● Metadata tells Angular how to process a class.
○ Like adding @Component decorator tells the compiler that
the class declared below is a Component.
● In TypeScript, you attach metadata by using a decorator.
○ For eg @Component, @NgModule, @Injectable etc.
Data Binding
● One-way data binding
● Two-way data binding
● Events binding
Directives
● Angular templates are dynamic. When Angular renders them,
it transforms the DOM according to the instructions given by
directives.
● Structural Directives
○ Structural directives alter layout by adding, removing, and
replacing elements in DOM.
○ *ngFor, *ngIf
Directives
● Attribute Directives:
○ Attribute directives alter the appearance or behavior of an
existing element.
○ ngModel, ngClass, hidden, required
Services
● Service is a broad category encompassing any value,
function, or feature that your application needs.
Dependency Injection
● Angular uses dependency injection to provide new
components with the services they need.
● When Angular creates a component(with dependencies), it
first asks an injector for the services that the component
requires.
● An injector maintains a container of service instances that it
has previously created.
If a requested service instance is not in the container, the
injector makes one and adds it to the container before
returning the service to Angular.
Dependency Injection
● providers
○ Component
○ NgModule
Introduction to Angular2
References
● https://angular.io/docs/ts/latest/guide/architecture.html
THANK YOU

More Related Content

PPTX
Angular.js presentation
Moran Fine
 
PPTX
Angular 1.x vs 2 - In code level
Anuradha Bandara
 
PDF
Angular2 with type script
Ravi Mone
 
PPTX
Presentation on angular 5
Ramesh Adhikari
 
PPTX
Custom elements
Ran Wahle
 
PPTX
AngularConf2016 - A leap of faith !?
Alessandro Giorgetti
 
PDF
Introduction to Angular 2
Dawid Myslak
 
PPTX
Angular 2 - a New Hope
Sami Suo-Heikki
 
Angular.js presentation
Moran Fine
 
Angular 1.x vs 2 - In code level
Anuradha Bandara
 
Angular2 with type script
Ravi Mone
 
Presentation on angular 5
Ramesh Adhikari
 
Custom elements
Ran Wahle
 
AngularConf2016 - A leap of faith !?
Alessandro Giorgetti
 
Introduction to Angular 2
Dawid Myslak
 
Angular 2 - a New Hope
Sami Suo-Heikki
 

What's hot (20)

PDF
Angular 2 - Core Concepts
Fabio Biondi
 
PPTX
Angular 2
Nigam Goyal
 
PDF
Angular2 with TypeScript
Rohit Bishnoi
 
PDF
The evolution of Angular 2 @ AngularJS Munich Meetup #5
Johannes Weber
 
PPTX
The Bleeding Edge - Whats New in Angular 2
Lohith Goudagere Nagaraj
 
PDF
Multitenant SaaS Apps In Rails By Iqbal Hasnan
iqbal hasnan
 
PPTX
Introduction to angular 2
Dor Moshe
 
ODP
Microservices in a netshell
Knoldus Inc.
 
PDF
Angular 2... so can I use it now??
Laurent Duveau
 
PDF
Trailblazer Rails Architecture
iqbal hasnan
 
PPTX
Introduction to Angular2
Ivan Matiishyn
 
PDF
Andrii Sliusar "Module Architecture of React-Redux Applications"
LogeekNightUkraine
 
PPTX
Migrating an Application from Angular 1 to Angular 2
Ross Dederer
 
PDF
Angular Advanced Routing
Laurent Duveau
 
ODP
Introduction to Angular 2
Knoldus Inc.
 
PPTX
Angular 4 and TypeScript
Ahmed El-Kady
 
PPTX
Angular 2 KTS
John Vall
 
ODP
Docker - An Introduction
Knoldus Inc.
 
PDF
React vs Angular2
Corley S.r.l.
 
Angular 2 - Core Concepts
Fabio Biondi
 
Angular 2
Nigam Goyal
 
Angular2 with TypeScript
Rohit Bishnoi
 
The evolution of Angular 2 @ AngularJS Munich Meetup #5
Johannes Weber
 
The Bleeding Edge - Whats New in Angular 2
Lohith Goudagere Nagaraj
 
Multitenant SaaS Apps In Rails By Iqbal Hasnan
iqbal hasnan
 
Introduction to angular 2
Dor Moshe
 
Microservices in a netshell
Knoldus Inc.
 
Angular 2... so can I use it now??
Laurent Duveau
 
Trailblazer Rails Architecture
iqbal hasnan
 
Introduction to Angular2
Ivan Matiishyn
 
Andrii Sliusar "Module Architecture of React-Redux Applications"
LogeekNightUkraine
 
Migrating an Application from Angular 1 to Angular 2
Ross Dederer
 
Angular Advanced Routing
Laurent Duveau
 
Introduction to Angular 2
Knoldus Inc.
 
Angular 4 and TypeScript
Ahmed El-Kady
 
Angular 2 KTS
John Vall
 
Docker - An Introduction
Knoldus Inc.
 
React vs Angular2
Corley S.r.l.
 
Ad

Viewers also liked (12)

ODP
Introduction to Nginx
Knoldus Inc.
 
PDF
Scaling Your Cache And Caching At Scale
Alex Miller
 
PPT
Using CDN to improve performance
Gea-Suan Lin
 
PPTX
Future of CDN - Next 10 Years - Ahmet Ozalp, Akamai Technologies - DigiWorld ...
IDATE DigiWorld
 
PPTX
Load Balancing and Scaling with NGINX
NGINX, Inc.
 
KEY
Redis in Practice
Noah Davis
 
PPTX
NGINX High-performance Caching
NGINX, Inc.
 
ODP
Introduction to DNS
Jonathan Oxer
 
PDF
Presentation on Domain Name System
Chinmay Joshi
 
PPTX
Domain Name System DNS
Akshay Tiwari
 
PDF
Everything you always wanted to know about Redis but were afraid to ask
Carlos Abalde
 
PPT
Dns ppt
Mauood Hamidi
 
Introduction to Nginx
Knoldus Inc.
 
Scaling Your Cache And Caching At Scale
Alex Miller
 
Using CDN to improve performance
Gea-Suan Lin
 
Future of CDN - Next 10 Years - Ahmet Ozalp, Akamai Technologies - DigiWorld ...
IDATE DigiWorld
 
Load Balancing and Scaling with NGINX
NGINX, Inc.
 
Redis in Practice
Noah Davis
 
NGINX High-performance Caching
NGINX, Inc.
 
Introduction to DNS
Jonathan Oxer
 
Presentation on Domain Name System
Chinmay Joshi
 
Domain Name System DNS
Akshay Tiwari
 
Everything you always wanted to know about Redis but were afraid to ask
Carlos Abalde
 
Dns ppt
Mauood Hamidi
 
Ad

Similar to Introduction to Angular2 (20)

PPTX
Angularjs2 presentation
dharisk
 
PPTX
Dive into Angular, part 4: Angular 2.0
Oleksii Prohonnyi
 
PPTX
Angularj2.0
Mallikarjuna G D
 
PPTX
Angular Course.pptx
Imdad Ullah
 
PPT
17612235.ppt
yovixi5669
 
PDF
better-apps-angular-2-day1.pdf and home
ChethanGowda886434
 
PPTX
Angular 9
Raja Vishnu
 
ODP
Angular2
kunalkumar376
 
PPT
Angular.ppt
Mytrux1
 
PPTX
Angular Basics.pptx
AshokKumar616995
 
PDF
Angular2
SitaPrajapati
 
PPTX
Introduction to angular | Concepts and Environment setup
Ansley Rodrigues
 
PPTX
Angular Components.pptx
AshokKumar616995
 
PPTX
Angular 5 presentation for beginners
Imran Qasim
 
PPTX
Angular 2 with typescript
Tayseer_Emam
 
PPTX
What's new in Angular 2?
Alfred Jett Grandeza
 
PDF
Building blocks of Angular
Knoldus Inc.
 
PDF
Angular 2 overview in 60 minutes
Loiane Groner
 
PDF
Introduction To Angular 4 - J2I
Nader Debbabi
 
Angularjs2 presentation
dharisk
 
Dive into Angular, part 4: Angular 2.0
Oleksii Prohonnyi
 
Angularj2.0
Mallikarjuna G D
 
Angular Course.pptx
Imdad Ullah
 
17612235.ppt
yovixi5669
 
better-apps-angular-2-day1.pdf and home
ChethanGowda886434
 
Angular 9
Raja Vishnu
 
Angular2
kunalkumar376
 
Angular.ppt
Mytrux1
 
Angular Basics.pptx
AshokKumar616995
 
Angular2
SitaPrajapati
 
Introduction to angular | Concepts and Environment setup
Ansley Rodrigues
 
Angular Components.pptx
AshokKumar616995
 
Angular 5 presentation for beginners
Imran Qasim
 
Angular 2 with typescript
Tayseer_Emam
 
What's new in Angular 2?
Alfred Jett Grandeza
 
Building blocks of Angular
Knoldus Inc.
 
Angular 2 overview in 60 minutes
Loiane Groner
 
Introduction To Angular 4 - J2I
Nader Debbabi
 

More from Knoldus Inc. (20)

PPTX
Angular Hydration Presentation (FrontEnd)
Knoldus Inc.
 
PPTX
Optimizing Test Execution: Heuristic Algorithm for Self-Healing
Knoldus Inc.
 
PPTX
Self-Healing Test Automation Framework - Healenium
Knoldus Inc.
 
PPTX
Kanban Metrics Presentation (Project Management)
Knoldus Inc.
 
PPTX
Java 17 features and implementation.pptx
Knoldus Inc.
 
PPTX
Chaos Mesh Introducing Chaos in Kubernetes
Knoldus Inc.
 
PPTX
GraalVM - A Step Ahead of JVM Presentation
Knoldus Inc.
 
PPTX
Nomad by HashiCorp Presentation (DevOps)
Knoldus Inc.
 
PPTX
Nomad by HashiCorp Presentation (DevOps)
Knoldus Inc.
 
PPTX
DAPR - Distributed Application Runtime Presentation
Knoldus Inc.
 
PPTX
Introduction to Azure Virtual WAN Presentation
Knoldus Inc.
 
PPTX
Introduction to Argo Rollouts Presentation
Knoldus Inc.
 
PPTX
Intro to Azure Container App Presentation
Knoldus Inc.
 
PPTX
Insights Unveiled Test Reporting and Observability Excellence
Knoldus Inc.
 
PPTX
Introduction to Splunk Presentation (DevOps)
Knoldus Inc.
 
PPTX
Code Camp - Data Profiling and Quality Analysis Framework
Knoldus Inc.
 
PPTX
AWS: Messaging Services in AWS Presentation
Knoldus Inc.
 
PPTX
Amazon Cognito: A Primer on Authentication and Authorization
Knoldus Inc.
 
PPTX
ZIO Http A Functional Approach to Scalable and Type-Safe Web Development
Knoldus Inc.
 
PPTX
Managing State & HTTP Requests In Ionic.
Knoldus Inc.
 
Angular Hydration Presentation (FrontEnd)
Knoldus Inc.
 
Optimizing Test Execution: Heuristic Algorithm for Self-Healing
Knoldus Inc.
 
Self-Healing Test Automation Framework - Healenium
Knoldus Inc.
 
Kanban Metrics Presentation (Project Management)
Knoldus Inc.
 
Java 17 features and implementation.pptx
Knoldus Inc.
 
Chaos Mesh Introducing Chaos in Kubernetes
Knoldus Inc.
 
GraalVM - A Step Ahead of JVM Presentation
Knoldus Inc.
 
Nomad by HashiCorp Presentation (DevOps)
Knoldus Inc.
 
Nomad by HashiCorp Presentation (DevOps)
Knoldus Inc.
 
DAPR - Distributed Application Runtime Presentation
Knoldus Inc.
 
Introduction to Azure Virtual WAN Presentation
Knoldus Inc.
 
Introduction to Argo Rollouts Presentation
Knoldus Inc.
 
Intro to Azure Container App Presentation
Knoldus Inc.
 
Insights Unveiled Test Reporting and Observability Excellence
Knoldus Inc.
 
Introduction to Splunk Presentation (DevOps)
Knoldus Inc.
 
Code Camp - Data Profiling and Quality Analysis Framework
Knoldus Inc.
 
AWS: Messaging Services in AWS Presentation
Knoldus Inc.
 
Amazon Cognito: A Primer on Authentication and Authorization
Knoldus Inc.
 
ZIO Http A Functional Approach to Scalable and Type-Safe Web Development
Knoldus Inc.
 
Managing State & HTTP Requests In Ionic.
Knoldus Inc.
 

Recently uploaded (20)

PDF
Why Should Businesses Extract Cuisine Types Data from Multiple U.S. Food Apps...
devilbrown689
 
PPTX
Maximizing Revenue with Marketo Measure: A Deep Dive into Multi-Touch Attribu...
bbedford2
 
PPTX
AIRLINE PRICE API | FLIGHT API COST |
philipnathen82
 
PDF
Why Use Open Source Reporting Tools for Business Intelligence.pdf
Varsha Nayak
 
PDF
Rise With SAP partner in Mumbai.........
pts464036
 
PPTX
Visualising Data with Scatterplots in IBM SPSS Statistics.pptx
Version 1 Analytics
 
DOCX
The Future of Smart Factories Why Embedded Analytics Leads the Way
Varsha Nayak
 
PDF
Micromaid: A simple Mermaid-like chart generator for Pharo
ESUG
 
PPTX
Benefits of DCCM for Genesys Contact Center
pointel ivr
 
PDF
Multi-factor Authentication (MFA) requirement for Microsoft 365 Admin Center_...
Q-Advise
 
PDF
The Future of Smart Factories Why Embedded Analytics Leads the Way
Varsha Nayak
 
PPTX
Why Use Open Source Reporting Tools for Business Intelligence.pptx
Varsha Nayak
 
PPT
Order to Cash Lifecycle Overview R12 .ppt
nbvreddy229
 
PDF
Jenkins: An open-source automation server powering CI/CD Automation
SaikatBasu37
 
PDF
The Role of Automation and AI in EHS Management for Data Centers.pdf
TECH EHS Solution
 
PDF
Solar Panel Installation Guide – Step By Step Process 2025.pdf
CRMLeaf
 
PPTX
10 Hidden App Development Costs That Can Sink Your Startup.pptx
Lunar Web Solution
 
PPTX
Hire Expert Blazor Developers | Scalable Solutions by OnestopDA
OnestopDA
 
PDF
Bandai Playdia The Book - David Glotz
BluePanther6
 
PPTX
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 
Why Should Businesses Extract Cuisine Types Data from Multiple U.S. Food Apps...
devilbrown689
 
Maximizing Revenue with Marketo Measure: A Deep Dive into Multi-Touch Attribu...
bbedford2
 
AIRLINE PRICE API | FLIGHT API COST |
philipnathen82
 
Why Use Open Source Reporting Tools for Business Intelligence.pdf
Varsha Nayak
 
Rise With SAP partner in Mumbai.........
pts464036
 
Visualising Data with Scatterplots in IBM SPSS Statistics.pptx
Version 1 Analytics
 
The Future of Smart Factories Why Embedded Analytics Leads the Way
Varsha Nayak
 
Micromaid: A simple Mermaid-like chart generator for Pharo
ESUG
 
Benefits of DCCM for Genesys Contact Center
pointel ivr
 
Multi-factor Authentication (MFA) requirement for Microsoft 365 Admin Center_...
Q-Advise
 
The Future of Smart Factories Why Embedded Analytics Leads the Way
Varsha Nayak
 
Why Use Open Source Reporting Tools for Business Intelligence.pptx
Varsha Nayak
 
Order to Cash Lifecycle Overview R12 .ppt
nbvreddy229
 
Jenkins: An open-source automation server powering CI/CD Automation
SaikatBasu37
 
The Role of Automation and AI in EHS Management for Data Centers.pdf
TECH EHS Solution
 
Solar Panel Installation Guide – Step By Step Process 2025.pdf
CRMLeaf
 
10 Hidden App Development Costs That Can Sink Your Startup.pptx
Lunar Web Solution
 
Hire Expert Blazor Developers | Scalable Solutions by OnestopDA
OnestopDA
 
Bandai Playdia The Book - David Glotz
BluePanther6
 
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 

Introduction to Angular2

  • 1. Introduction to Angular2 - Akshay Rana - Software Consultant (Knoldus Software LLP)
  • 2. Agenda ● INTRODUCTION ● ARCHITECTURE ○ Components ○ Templates ○ Modules ○ Metadata ○ Data Binding ○ Directives ○ Services ○ Dependency Injection
  • 3. Introduction ● Angular 2 is the next version of Google’s massively popular MVC framework for building complex single page applications in the browser (and beyond). ● A faster, more powerful, cleaner, and easier to use tool than we had with Angular 1.​
  • 5. Components ● A component controls a patch of screen called a view. ● Angular creates, updates, and destroys components as the user moves through the application. Your app can take action at each moment in this lifecycle through optional lifecycle hooks. ● @Component //decorator
  • 6. 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.
  • 7. Modules ● Angular apps are modular and Angular has its own modularity system called Angular modules or NgModules. ● Every Angular app has at least one Angular module class, the root module. ● While the root module may be the only module in a small application, most apps have many more feature modules. ● @NgModule //decorator
  • 8. Metadata ● Metadata tells Angular how to process a class. ○ Like adding @Component decorator tells the compiler that the class declared below is a Component. ● In TypeScript, you attach metadata by using a decorator. ○ For eg @Component, @NgModule, @Injectable etc.
  • 9. Data Binding ● One-way data binding ● Two-way data binding ● Events binding
  • 10. Directives ● Angular templates are dynamic. When Angular renders them, it transforms the DOM according to the instructions given by directives. ● Structural Directives ○ Structural directives alter layout by adding, removing, and replacing elements in DOM. ○ *ngFor, *ngIf
  • 11. Directives ● Attribute Directives: ○ Attribute directives alter the appearance or behavior of an existing element. ○ ngModel, ngClass, hidden, required
  • 12. Services ● Service is a broad category encompassing any value, function, or feature that your application needs.
  • 13. Dependency Injection ● Angular uses dependency injection to provide new components with the services they need. ● When Angular creates a component(with dependencies), it first asks an injector for the services that the component requires. ● An injector maintains a container of service instances that it has previously created. If a requested service instance is not in the container, the injector makes one and adds it to the container before returning the service to Angular.
  • 14. Dependency Injection ● providers ○ Component ○ NgModule