SlideShare a Scribd company logo
DIVE INTO ANGULAR,
PART 4: ANGULAR 2.0
_by Oleksii Prohonnyi
AGENDA
 What’s new
 Build Angular 2 app in 6 steps
 ES6 vs TypeScript
 Architecture
 Module
 Component
 Template
 Data binding
 Service
 1.x vs 2.0 comparison
 References
WHAT’S NEW
WHAT’S NEW
 Component-based
 Simplified directives
 Dependency injection
 TypeScript (ES6 + Types + Annotations)
 Generics
 Lambdas with TypeScript
 Forms and Validations
 See more: dzone.com
BUILD ANGULAR 2 APP
IN 6 STEPS
BUILD ANGULAR 2 APP
0. Install Node.js and npm.
1. Create and configure the project.
2. Create your application.
3. Create a component and add it to your application.
4. Start up your application.
5. Define the web page that hosts the application.
6. Build and run the application.
 Download example: github.com
 See more: angular.io
ES6 VS TYPESCRIPT
ES6 VS TYPESCRIPT
ES6 VS TYPESCRIPT
See more:
 EcmaScript 6/2015
 TypeScript
ARCHITECTURE
ARCHITECTURE
 The framework consists of several cooperating libraries, some of
them core and some optional.
 The eight main building blocks of an Angular 2 application:
– Modules
– Components
– Templates
– Metadata
– Data binding
– Directives
– Services
– Dependency injection
 See more: angular.io
ARCHITECTURE
MODULE
MODULE
 Every Angular app has at least one module, the root module,
conventionally named AppModule.
 An Angular module, whether a root or feature, is a class with an
@NgModule decorator.
 NgModule is a decorator function that takes a single metadata
object whose properties describe the module (declarations,
exports, imports, providers, bootstrap).
MODULE
COMPONENT
COMPONENT
 A component controls a patch of screen real estate that we could
call a view.
 We define a component's application logic — what it does to
support the view — inside a class.
 The class interacts with the view through an API of properties
and methods.
COMPONENT
COMPONENT
 In TypeScript, we attach metadata by using a decorator:
TEMPLATE
TEMPLATE
 We define a component's view with its companion template.
 A template is a form of HTML that tells Angular how to render the
component.
DATA BINDING
DATA BINDING
 Angular supports data binding, a mechanism for coordinating
parts of a template with parts of a component.
 There are four forms of data binding syntax. Each form has a
direction — to the DOM, from the DOM, or in both directions:
DATA BINDING
 Two-way data binding is an important fourth form that combines
property and event binding in a single notation, using the
ngModel directive.
SERVICE
SERVICE
 Service is a broad category encompassing any value, function, or
feature that our application needs.
 Almost anything can be a service. A service is typically a class
with a narrow, well-defined purpose. It should do something
specific and do it well.
1.X VS 2.0 COMPARISON
1.X VS 2.0: Data binding
1.X VS 2.0: Filters
1.X VS 2.0: Local variables
1.X VS 2.0: Ng-App
1.X VS 2.0: Ng-Class
1.X VS 2.0: Ng-Click
1.X VS 2.0: Ng-Controller
1.X VS 2.0: Ng-Href
1.X VS 2.0: Ng-If
1.X VS 2.0: Ng-Model
1.X VS 2.0: Ng-Repeat
1.X VS 2.0: Ng-Show
1.X VS 2.0: Ng-Src
1.X VS 2.0: Ng-Style
1.X VS 2.0: Ng-Switch
1.X VS 2.0: Controllers
1.X VS 2.0: Dependency injection
SEE MORE
SEE MORE
 Directive
 Dependency injection
 Wrapping
 Filters
 Input & output
 Forms
 Style guide
REFERENCES
REFERENCES
 https://angular.io/
 http://www.angular2.com/
 https://angular.io/docs/ts/latest/tutorial/
 http://eisenbergeffect.bluespire.com/all-about-angular-2-0/
 https://www.lynda.com/AngularJS-tutorials/Learn-AngularJS-2-
Basics/428058-2.html
 https://egghead.io/courses/angular-2-fundamentals
 http://learnangular2.com/
Dive into Angular, part 4: Angular 2.0
HOME TASK
HOME TASK
 Main idea: migrate existing application on a new version of
Angular.js framework.
 Technical details:
– Component structure
– Component router
– TypeScript/EcmaScript 6
– Readme with installation instructions
Oleksii Prohonnyi
facebook.com/oprohonnyi
linkedin.com/in/oprohonnyi

More Related Content

PPTX
Dive into Angular, part 1: Introduction
PPTX
Dive into Angular, part 3: Performance
PPTX
Dive into Angular, part 5: Experience
PPTX
Code migration from Angular 1.x to Angular 2.0
PPTX
Migrating an Application from Angular 1 to Angular 2
PPSX
Angular 4 fronts
PPTX
Angular 4 and TypeScript
PPTX
Angular 4 - quick view
Dive into Angular, part 1: Introduction
Dive into Angular, part 3: Performance
Dive into Angular, part 5: Experience
Code migration from Angular 1.x to Angular 2.0
Migrating an Application from Angular 1 to Angular 2
Angular 4 fronts
Angular 4 and TypeScript
Angular 4 - quick view

What's hot (20)

PPTX
Dive into Angular, part 2: Architecture
PDF
Introduction to angular 2
PDF
Angular 2 - An Introduction
PPTX
Migrating an application from Angular 1 to Angular 2
PDF
Developing a Demo Application with Angular 4 - J2I
PPTX
PPTX
PPTX
Angular 9 New features
ODP
Angular 6 - The Complete Guide
PDF
Introduction to Angular 2
PPTX
Angular 9
PDF
Introduction To Angular 4 - J2I
ODP
Introduction to Angular 2
PDF
The productive developer guide to Angular 2
PPTX
Angular 4 Introduction Tutorial
PDF
What is Angular version 4?
PDF
Angular2 with TypeScript
PPTX
Introduction to angular 2
PDF
Building Universal Applications with Angular 2
PDF
Angular 2... so can I use it now??
Dive into Angular, part 2: Architecture
Introduction to angular 2
Angular 2 - An Introduction
Migrating an application from Angular 1 to Angular 2
Developing a Demo Application with Angular 4 - J2I
Angular 9 New features
Angular 6 - The Complete Guide
Introduction to Angular 2
Angular 9
Introduction To Angular 4 - J2I
Introduction to Angular 2
The productive developer guide to Angular 2
Angular 4 Introduction Tutorial
What is Angular version 4?
Angular2 with TypeScript
Introduction to angular 2
Building Universal Applications with Angular 2
Angular 2... so can I use it now??
Ad

Viewers also liked (20)

PDF
Quick introduction to Angular 4 for AngularJS 1.5 developers
PPTX
Conference DotJS 2015 Paris review
PPTX
Как создать сайт за 2 часа? (Wordpress)
PPTX
Exploradores.caroes
PPTX
Cycle.js overview
PPTX
Front-end rich JavaScript application creation (Backbone.js)
PPT
Разработка веб-сайта. Сайт. Зачем он?
PPTX
Asm.js introduction
PPTX
Chorme devtools
PPTX
Moment.js overview
PPTX
Utility libraries to make your life easier
PPTX
D3.JS Tips & Tricks (export to svg, crossfilter, maps etc.)
PPTX
OpenLayer's basics
PDF
Chrome DevTools Awesome 10 Features +1
PPTX
Bower introduction
PPTX
Google Chrome DevTools features overview
PDF
20 reasons why we don't need architects (@pavlobaron)
KEY
Winning the Erlang Edit•Build•Test Cycle
PDF
High Performance Erlang
PDF
What can be done with Java, but should better be done with Erlang (@pavlobaron)
Quick introduction to Angular 4 for AngularJS 1.5 developers
Conference DotJS 2015 Paris review
Как создать сайт за 2 часа? (Wordpress)
Exploradores.caroes
Cycle.js overview
Front-end rich JavaScript application creation (Backbone.js)
Разработка веб-сайта. Сайт. Зачем он?
Asm.js introduction
Chorme devtools
Moment.js overview
Utility libraries to make your life easier
D3.JS Tips & Tricks (export to svg, crossfilter, maps etc.)
OpenLayer's basics
Chrome DevTools Awesome 10 Features +1
Bower introduction
Google Chrome DevTools features overview
20 reasons why we don't need architects (@pavlobaron)
Winning the Erlang Edit•Build•Test Cycle
High Performance Erlang
What can be done with Java, but should better be done with Erlang (@pavlobaron)
Ad

Similar to Dive into Angular, part 4: Angular 2.0 (20)

PPTX
Angular Basics.pptx
PPTX
Angular interview questions
PDF
Angular2 with type script
PPTX
Angular kickstart slideshare
DOCX
Angular.js interview questions
PDF
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdf
DOCX
Angular js getting started
PDF
angularjs-vs-angular-the-key-differences-between-javascript-and-typescript
PDF
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdf
PPTX
Angular 18 course for begineers and experienced
PPTX
Angular 5 presentation for beginners
PPTX
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
PDF
Angular Project Report
PDF
Integrating TypeScript with popular frameworks like React or Angular.pdf
PPTX
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
PPTX
Angular Framework ppt for beginners and advanced
PPTX
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
PDF
Angular Interview Questions-PDF.pdf
PPTX
How Does Angular Work?
PPTX
Angular js
Angular Basics.pptx
Angular interview questions
Angular2 with type script
Angular kickstart slideshare
Angular.js interview questions
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdf
Angular js getting started
angularjs-vs-angular-the-key-differences-between-javascript-and-typescript
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdf
Angular 18 course for begineers and experienced
Angular 5 presentation for beginners
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
Angular Project Report
Integrating TypeScript with popular frameworks like React or Angular.pdf
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
Angular Framework ppt for beginners and advanced
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
Angular Interview Questions-PDF.pdf
How Does Angular Work?
Angular js

More from Oleksii Prohonnyi (11)

PPTX
JavaScript Presentation Frameworks and Libraries
PPTX
Introduction to D3.js
PPTX
Code review process with JetBrains UpSource
PPTX
BEM methodology overview
PPTX
Front-end development introduction (JavaScript). Part 2
PPTX
Front-end development introduction (HTML, CSS). Part 1
PPTX
Test-driven development & Behavior-driven development basics
PPTX
JavaScript Coding Guidelines
PPTX
Database Optimization (MySQL)
PPTX
PHPCS (PHP Code Sniffer)
PPTX
Usability of UI Design (motivation, heuristics, tools)
JavaScript Presentation Frameworks and Libraries
Introduction to D3.js
Code review process with JetBrains UpSource
BEM methodology overview
Front-end development introduction (JavaScript). Part 2
Front-end development introduction (HTML, CSS). Part 1
Test-driven development & Behavior-driven development basics
JavaScript Coding Guidelines
Database Optimization (MySQL)
PHPCS (PHP Code Sniffer)
Usability of UI Design (motivation, heuristics, tools)

Recently uploaded (20)

PDF
System and Network Administration Chapter 2
PPTX
ai tools demonstartion for schools and inter college
PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
Introduction to Artificial Intelligence
PDF
System and Network Administraation Chapter 3
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
medical staffing services at VALiNTRY
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
AI in Product Development-omnex systems
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Digital Strategies for Manufacturing Companies
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPTX
history of c programming in notes for students .pptx
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
System and Network Administration Chapter 2
ai tools demonstartion for schools and inter college
CHAPTER 2 - PM Management and IT Context
Introduction to Artificial Intelligence
System and Network Administraation Chapter 3
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Navsoft: AI-Powered Business Solutions & Custom Software Development
medical staffing services at VALiNTRY
Softaken Excel to vCard Converter Software.pdf
Design an Analysis of Algorithms II-SECS-1021-03
AI in Product Development-omnex systems
Operating system designcfffgfgggggggvggggggggg
Design an Analysis of Algorithms I-SECS-1021-03
Digital Strategies for Manufacturing Companies
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
ManageIQ - Sprint 268 Review - Slide Deck
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
Odoo Companies in India – Driving Business Transformation.pdf
history of c programming in notes for students .pptx
Lecture 3: Operating Systems Introduction to Computer Hardware Systems

Dive into Angular, part 4: Angular 2.0