SlideShare a Scribd company logo
Introduction to Angular 2, DevMT Meetup, April 2016
Introduction to Angular 2
Dhyego Fernando
Introduction to Angular 2, DevMT Meetup, April 2016
Meetup?
Introduction to Angular 2, DevMT Meetup, April 2016
@dhyegofernando
full-stack dev
Introduction to Angular 2, DevMT Meetup, April 2016
Agenda
✓ How to prepare yourself?
✓ Short history about SPA
✓ Why Angular 2?
Introduction to angular 2
Introduction to Angular 2, DevMT Meetup, April 2016
the beginning
Introduction to Angular 2, DevMT Meetup, April 2016
youtube.com @2005
Introduction to angular 2
Introduction to Angular 2, DevMT Meetup, April 2016
Single Page Applications
Introduction to Angular 2, DevMT Meetup, April 2016
Introduction to Angular 2, DevMT Meetup, April 2016
Web Apps FTW
Introduction to Angular 2, DevMT Meetup, April 2016
GetAngular
Misko Hevery
Adam Abrons
Introduction to Angular 2, DevMT Meetup, April 2016
✓ Directives
✓ Data-binding
✓ MVWhatever
Introduction to Angular 2, DevMT Meetup, April 2016
Data-binding
<input type="text" ng-model="yourName">
<h1>Hello {{yourName}}!</h1>
Introduction to Angular 2, DevMT Meetup, April 2016
MVW
Introduction to Angular 2, DevMT Meetup, April 2016
Directives
<tabset>
<tab heading="Title 1">
<p>Content 1 goes here</p>
</tab>
<tab heading="Title 2">
<p>Content 2 goes here</p>
</tab>
<tab heading="Title 3">
<p>Content 3 goes here</p>
</tab>
</tabset>
1.1+ Million
Developers
Introduction to Angular 2, DevMT Meetup, April 2016
48k+ stars
Introduction to Angular 2, DevMT Meetup, April 2016
Angular 1 Releases
Introduction to Angular 2, DevMT Meetup, April 2016
Google products in Angular 1
Introduction to Angular 2, DevMT Meetup, April 2016
madewithangular.com
Introduction to Angular 2, DevMT Meetup, April 2016
+mobile platform apps
Introduction to Angular 2, DevMT Meetup, April 2016
Angular 2
Officialy announced at ng-europe 2014
Introduction to angular 2
Introduction to Angular 2, DevMT Meetup, April 2016
Why Angular 2?
Introduction to Angular 2, DevMT Meetup, April 2016
AngularJS (1.x)
→ Design decisions (not so good)
→ Web platform evolution
More at http://blog.jhades.org/introduction-to-angular2-the-main-goals
Introduction to Angular 2, DevMT Meetup, April 2016
Design Decisions
→ Third-party libraries (interoperability)
→ Directive Definition Object
→ $scope and $digest cycles
Introduction to Angular 2, DevMT Meetup, April 2016
Web platform evolution → Web Workers
→ Web Components
→ ES6, ES7, TypeScript, Dart…
→ Offline Apps (Service Workers)
→ Mobile Apps
Introduction to Angular 2, DevMT Meetup, April 2016
So, what’s new?
Introduction to Angular 2, DevMT Meetup, April 2016
What’s new?
Edge Web API Template Syntax Change Detection
Introduction to Angular 2, DevMT Meetup, April 2016
Edge Web API
x Directives + Content Transclusion✓ Directives + Content Transclusion
✓ Components + Content Projection
Introduction to Angular 2, DevMT Meetup, April 2016
Angular 1 Directives + Content Transclusion
Introduction to Angular 2, DevMT Meetup, April 2016
Angular 1: Directives + Content Transclusion
My Title
My Content
Property binding
Content transclusion
<my-card title="My Title">
<p>My Content</p>
</my-card>
Introduction to Angular 2, DevMT Meetup, April 2016
Property binding
Content transclusion
Angular 1: Directives + Content Transclusion
app.directive('myCard', function() {
// ...
scope: {
title: '@'
},
transclude: true
});
Introduction to Angular 2, DevMT Meetup, April 2016
Property binding
Content transclusion
<div class="my-card">
<h1>{{ title }}</h1>
<div ng-transclude></div>
</div>
Angular 1: Directives + Content Transclusion
Introduction to Angular 2, DevMT Meetup, April 2016
Angular 2 Components + Content Projection
Introduction to Angular 2, DevMT Meetup, April 2016
Angular 2: Components + Content Projection
Property binding
Content transclusion
<my-card [title]=“‘My Title’">
<p>My Content</p>
</my-card>
Introduction to Angular 2, DevMT Meetup, April 2016
Property binding
Content transclusion
Angular 2: Components + Content Projection
<div class="my-card">
<h1>{{ title }}</h1>
<content></content>
</div>
Introduction to Angular 2, DevMT Meetup, April 2016
Property binding
Content transclusion
Angular 2: Components + Content Projection
@Component({
selector: 'my-card',
properties: ['title']
})
@View({
// ...
encapsulation: ViewEncapsulation.Native
})
class MyCard { }
Introduction to Angular 2, DevMT Meetup, April 2016
Components
Template
Directive
Controller Component
ng1 ng2
Introduction to Angular 2, DevMT Meetup, April 2016
Edge Web API
✓ Component encapsulation (emulated or native)
✓ Plain JS Classes + Metadata

(TypeScript decorators are optionals)
Introduction to Angular 2, DevMT Meetup, April 2016
Template Syntax
Introduction to Angular 2, DevMT Meetup, April 2016
Angular 1: Template syntax
Entry property
Entry property
Out property
<my-card title="{{ title }}"
visible="visible"
remove="onRemove()"></my-card>
scope: {
title: '@',
visible: '=',
on-remote: '&'
}
Introduction to Angular 2, DevMT Meetup, April 2016
Templates
Binding Example
Properties
Events
Two-way
https://angular.io/docs/ts/latest/guide/template-syntax.html#!#binding-syntax
<input [value]="firstName">
<button (click)="save($event)">
<input [(ng-model)]="firstName">
Introduction to Angular 2, DevMT Meetup, April 2016
Angular 2: Template syntax
Entry property
Entry property
Out property
properties: [
'title',
'visible'
]
@Output() remove = new EventEmitter();
<my-card [title]=“title"
[visible]=“visible”
(remove)=“onRemove()”></my-card>
Introduction to Angular 2, DevMT Meetup, April 2016
Template Syntax
✓ Simpler API to memorize
✓ Valid HTML
✓ Syntax more semantic
Introduction to Angular 2, DevMT Meetup, April 2016
Change Detection
✓ Cyclic graphsx Cyclic graphs
✓ Tree of components
Introduction to Angular 2, DevMT Meetup, April 2016
Angular 1: Cyclic graphs
x Dirty checking
x Unpredictable watchers
x Unpredictable digest cycle runs
http://blog.jhades.org/introduction-to-angular2-the-main-goals/#howangular1implementsbinding
Introduction to Angular 2, DevMT Meetup, April 2016
Angular 2: Tree of components
✓ Predictable watchers
✓ Independent change detector
✓ Switchable strategies for each CD

(great for immutability)
@Component({
changeDetection: ChangeDetectionStrategy.OnPush
})
http://victorsavkin.com/post/110170125256/change-detection-in-angular-2
Introduction to Angular 2, DevMT Meetup, April 2016
Change Detection
✓ Faster changes detections (3x ~ 5x)
✓ Independent component CD
✓ Switchable change strategies

(can be more faster yet 3x ~ 8x)
✓ Tree of components
Introduction to Angular 2, DevMT Meetup, April 2016
Are we done?
Introduction to angular 2
Introduction to Angular 2, DevMT Meetup, April 2016
Isomorphic Rendering
https://github.com/angular/universal
Introduction to Angular 2, DevMT Meetup, April 2016
Web Workers Support ✓ Sandbox untrusted code
✓ Awesome for mobile
✓ Concurrency & Parallelism
https://github.com/angular/angular/blob/master/modules/angular2/docs/web_workers/web_workers.md
Introduction to Angular 2, DevMT Meetup, April 2016
Unidirectional Data Flow
✓ Easier to debug
✓ Interoperable (RxJS, Flux, Redux…)
✓ Faster
Introduction to Angular 2, DevMT Meetup, April 2016
Simpler to Learn
Introduction to Angular 2, DevMT Meetup, April 2016
Multi Languages Support
Introduction to Angular 2, DevMT Meetup, April 2016
ES5 ES6 TypeScript Dart
Multi Languages Support
Introduction to Angular 2, DevMT Meetup, April 2016
ES5 ES6 TypeScript Dart
No Compile Compile
Multi Languages Support
Introduction to Angular 2, DevMT Meetup, April 2016
ES5 ES6 TypeScript Dart
No Types Types
Multi Languages Support
Introduction to Angular 2, DevMT Meetup, April 2016
ES5 ES6 TypeScript Dart
JavaScript-Based Syntax No JS
Multi Languages Support
Introduction to Angular 2, DevMT Meetup, April 2016
ES6ES5 TypeScript Dart
No JS
ES6
JavaScript-Based Syntax
Multi Languages Support
Introduction to Angular 2, DevMT Meetup, April 2016
TypeScriptES6ES5 Dart
No JS
TypeScriptES6
JavaScript-Based Syntax
Multi Languages Support
Introduction to Angular 2, DevMT Meetup, April 2016
Tools
Introduction to Angular 2, DevMT Meetup, April 2016
Angular CLI
https://github.com/angular/angular-cli
Introduction to Angular 2, DevMT Meetup, April 2016
Introduction to Angular 2, DevMT Meetup, April 2016
Batarangle ✓ Template navigation
✓ Debugging
✓ Performance analysis
http://go.rangle.io/batarangle
Introduction to angular 2
Introduction to Angular 2, DevMT Meetup, April 2016
Cross Platform
Introduction to angular 2
Introduction to Angular 2, DevMT Meetup, April 2016
Cross Platform
Mobile Web MobileDesktop
Introduction to Angular 2, DevMT Meetup, April 2016
Angular
Universal
Web
Workers
Mobile Web
Material
Design
Introduction to Angular 2, DevMT Meetup, April 2016
Mobile
Introduction to Angular 2, DevMT Meetup, April 2016
Ionic Framework
Max Lynch

Adam Bradley
Introduction to Angular 2, DevMT Meetup, April 2016
Ionic Framework
✓ Apps featured by Google & Apple
✓ Battle-tested by lots of startups
✓ 1.2M+ apps built since 02/2014
Introduction to Angular 2, DevMT Meetup, April 2016
Ionic v2 built upon Angular 2
✓ Use modern Web APIs like Web Workers
✓ Express Ionic as a more traditional GUI architecture
✓ Dramatically improve render performance
✓ Reduce the barrier to entry (it’s mostly vanilla javascript)
http://ionic.io/2
Introduction to Angular 2, DevMT Meetup, April 2016
New features
✓ Material design support
✓ New animation and scrolling
✓ Overhauled navigation
✓ Powerful theming system
✓ New components and templates
Introduction to Angular 2, DevMT Meetup, April 2016
Introduction to Angular 2, DevMT Meetup, April 2016
The Path to Angular 2
Introduction to Angular 2, DevMT Meetup, April 2016
ng1
ng2
Introduction to Angular 2, DevMT Meetup, April 2016
...
Introduction to Angular 2, DevMT Meetup, April 2016
ngUpgrade
http://blog.thoughtram.io/angular/2015/10/24/upgrading-apps-to-angular-2-using-ngupgrade.html
https://github.com/angular/angular/tree/master/modules/playground/src/upgrade
Introduction to Angular 2, DevMT Meetup, April 2016
ngUpgrade
Left
Top Nav
Main View
1
1
1 1
1 1 1
1 1 1
1 1 1
Introduction to Angular 2, DevMT Meetup, April 2016
ngUpgrade
Left
Top Nav
Main View
1
1
1 1
1 1 1
1 1 1
1 1 1
2 2
2
2
2 2 2
2 2 2
2 2 2
Introduction to Angular 2, DevMT Meetup, April 2016
Learning Angular 2
Introduction to Angular 2, DevMT Meetup, April 2016
Supported Browsers
4.1+
9, 10, 11
Introduction to Angular 2, DevMT Meetup, April 2016
Release Status
https://splintercode.github.io/is-angular-2-ready/
Introduction to Angular 2, DevMT Meetup, April 2016
Live Demo
https://github.com/johnpapa/angular2-tour-of-heroes
Introduction to angular 2
Introduction to Angular 2, DevMT Meetup, April 2016
Want to talk too?
http://devmt.herokuapp.com/
+
Introduction to Angular 2, DevMT Meetup, April 2016
http://frontincuiaba.com.br/
Introduction to Angular 2, DevMT Meetup, April 2016
http://hackinarena.com.br/
Introduction to Angular 2, DevMT Meetup, April 2016
Feedbacks?
@dhyegofernando

More Related Content

PPTX
Introduction to angular 2
PDF
Introduction to Angular 2
PDF
What is Angular version 4?
PPTX
Angular 2 - Better or worse
PPTX
PDF
Angular 2 - An Introduction
PPTX
Talk for DevFest 2021 - GDG Bénin
PPTX
Introduction to angular 2
Introduction to Angular 2
What is Angular version 4?
Angular 2 - Better or worse
Angular 2 - An Introduction
Talk for DevFest 2021 - GDG Bénin

What's hot (20)

PDF
Angular 2 - The Next Framework
PDF
Angular 2: What's New?
PDF
Angular 2 Essential Training
PDF
Tech Webinar: Angular 2, Introduction to a new framework
PDF
Angular2 with type script
PDF
Quick introduction to Angular 4 for AngularJS 1.5 developers
PDF
Angular 2... so can I use it now??
PPTX
Angular1x and Angular 2 for Beginners
PPSX
Angular 4 fronts
ODP
Introduction to Angular 2
ODP
Angular 6 - The Complete Guide
PDF
Angular 2 - Core Concepts
PDF
Angular Advanced Routing
PDF
Angular 2 overview
PPTX
Dive into Angular, part 4: Angular 2.0
PDF
Building Universal Applications with Angular 2
PDF
Getting Started with Angular 2
PDF
The evolution of Angular 2 @ AngularJS Munich Meetup #5
PDF
Angular 2 : le réveil de la force
PPTX
Angular 9
Angular 2 - The Next Framework
Angular 2: What's New?
Angular 2 Essential Training
Tech Webinar: Angular 2, Introduction to a new framework
Angular2 with type script
Quick introduction to Angular 4 for AngularJS 1.5 developers
Angular 2... so can I use it now??
Angular1x and Angular 2 for Beginners
Angular 4 fronts
Introduction to Angular 2
Angular 6 - The Complete Guide
Angular 2 - Core Concepts
Angular Advanced Routing
Angular 2 overview
Dive into Angular, part 4: Angular 2.0
Building Universal Applications with Angular 2
Getting Started with Angular 2
The evolution of Angular 2 @ AngularJS Munich Meetup #5
Angular 2 : le réveil de la force
Angular 9
Ad

Viewers also liked (20)

PPTX
Migrating an Application from Angular 1 to Angular 2
PPTX
Angular 2 a traveler's diary
PPTX
Angular 2.0
PPTX
Brief intro 2 to angular 2
PDF
AzovDevMeetup 2016 | Angular 2: обзор | Александр Шевнин
PDF
Commit University - Exploring Angular 2
PPTX
PPT on Angular 2 Development Tutorial
PPTX
Angular 2 with typescript
PPTX
Angular 2 Migration - JHipster Meetup 6
PDF
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Angular Summit 2015
PDF
TDC 2014 - Arquitetura front-end com AngularJS
PDF
Getting Started with the Angular 2 CLI
PDF
Get that Corner Office with Angular 2 and Electron
PPTX
Angular js 2
PPTX
An afternoon with angular 2
PPTX
Angular 2
PDF
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - DOSUG February 2016
PDF
Introduction to Angular 2
PDF
Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016
PDF
Angular 2 for Java Developers
Migrating an Application from Angular 1 to Angular 2
Angular 2 a traveler's diary
Angular 2.0
Brief intro 2 to angular 2
AzovDevMeetup 2016 | Angular 2: обзор | Александр Шевнин
Commit University - Exploring Angular 2
PPT on Angular 2 Development Tutorial
Angular 2 with typescript
Angular 2 Migration - JHipster Meetup 6
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Angular Summit 2015
TDC 2014 - Arquitetura front-end com AngularJS
Getting Started with the Angular 2 CLI
Get that Corner Office with Angular 2 and Electron
Angular js 2
An afternoon with angular 2
Angular 2
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - DOSUG February 2016
Introduction to Angular 2
Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016
Angular 2 for Java Developers
Ad

Similar to Introduction to angular 2 (20)

PPTX
Angular 2 On Production (IT Talk in Dnipro)
PPTX
An evening with Angular 2
PDF
Angular 2 Crash Course
PPTX
Angular 2 KTS
PDF
Angular2 tutorial
PDF
Instant download Angular 2 Cookbook Frisbie pdf all chapter
PDF
New World of Angular (v2+)
PPTX
Angular
PDF
Angular Project Report
PPTX
Angular2v2
PDF
better-apps-angular-2-day1.pdf and home
PDF
Angular2 Development for Java developers
PPTX
Moving From AngularJS to Angular 2
PPTX
Angular2 getting started by Stephen Lautier
PDF
Angular2 with TypeScript
PPTX
Angular js 2.0 beta
DOCX
Angular Interview Questions & Answers
PPTX
Angular2 getstart
ODP
A Glimpse on Angular 4
PDF
Infosys Angular Interview Questions PDF By ScholarHat
Angular 2 On Production (IT Talk in Dnipro)
An evening with Angular 2
Angular 2 Crash Course
Angular 2 KTS
Angular2 tutorial
Instant download Angular 2 Cookbook Frisbie pdf all chapter
New World of Angular (v2+)
Angular
Angular Project Report
Angular2v2
better-apps-angular-2-day1.pdf and home
Angular2 Development for Java developers
Moving From AngularJS to Angular 2
Angular2 getting started by Stephen Lautier
Angular2 with TypeScript
Angular js 2.0 beta
Angular Interview Questions & Answers
Angular2 getstart
A Glimpse on Angular 4
Infosys Angular Interview Questions PDF By ScholarHat

Recently uploaded (20)

PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
System and Network Administration Chapter 2
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Nekopoi APK 2025 free lastest update
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PPTX
history of c programming in notes for students .pptx
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
medical staffing services at VALiNTRY
PDF
System and Network Administraation Chapter 3
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Which alternative to Crystal Reports is best for small or large businesses.pdf
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
System and Network Administration Chapter 2
How Creative Agencies Leverage Project Management Software.pdf
Internet Downloader Manager (IDM) Crack 6.42 Build 41
ISO 45001 Occupational Health and Safety Management System
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Nekopoi APK 2025 free lastest update
Design an Analysis of Algorithms I-SECS-1021-03
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
history of c programming in notes for students .pptx
Odoo Companies in India – Driving Business Transformation.pdf
VVF-Customer-Presentation2025-Ver1.9.pptx
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
medical staffing services at VALiNTRY
System and Network Administraation Chapter 3
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...

Introduction to angular 2

  • 1. Introduction to Angular 2, DevMT Meetup, April 2016 Introduction to Angular 2 Dhyego Fernando
  • 2. Introduction to Angular 2, DevMT Meetup, April 2016 Meetup?
  • 3. Introduction to Angular 2, DevMT Meetup, April 2016 @dhyegofernando full-stack dev
  • 4. Introduction to Angular 2, DevMT Meetup, April 2016 Agenda ✓ How to prepare yourself? ✓ Short history about SPA ✓ Why Angular 2?
  • 6. Introduction to Angular 2, DevMT Meetup, April 2016 the beginning
  • 7. Introduction to Angular 2, DevMT Meetup, April 2016 youtube.com @2005
  • 9. Introduction to Angular 2, DevMT Meetup, April 2016 Single Page Applications
  • 10. Introduction to Angular 2, DevMT Meetup, April 2016
  • 11. Introduction to Angular 2, DevMT Meetup, April 2016 Web Apps FTW
  • 12. Introduction to Angular 2, DevMT Meetup, April 2016 GetAngular Misko Hevery Adam Abrons
  • 13. Introduction to Angular 2, DevMT Meetup, April 2016 ✓ Directives ✓ Data-binding ✓ MVWhatever
  • 14. Introduction to Angular 2, DevMT Meetup, April 2016 Data-binding <input type="text" ng-model="yourName"> <h1>Hello {{yourName}}!</h1>
  • 15. Introduction to Angular 2, DevMT Meetup, April 2016 MVW
  • 16. Introduction to Angular 2, DevMT Meetup, April 2016 Directives <tabset> <tab heading="Title 1"> <p>Content 1 goes here</p> </tab> <tab heading="Title 2"> <p>Content 2 goes here</p> </tab> <tab heading="Title 3"> <p>Content 3 goes here</p> </tab> </tabset>
  • 18. Introduction to Angular 2, DevMT Meetup, April 2016 48k+ stars
  • 19. Introduction to Angular 2, DevMT Meetup, April 2016 Angular 1 Releases
  • 20. Introduction to Angular 2, DevMT Meetup, April 2016 Google products in Angular 1
  • 21. Introduction to Angular 2, DevMT Meetup, April 2016 madewithangular.com
  • 22. Introduction to Angular 2, DevMT Meetup, April 2016 +mobile platform apps
  • 23. Introduction to Angular 2, DevMT Meetup, April 2016 Angular 2 Officialy announced at ng-europe 2014
  • 25. Introduction to Angular 2, DevMT Meetup, April 2016 Why Angular 2?
  • 26. Introduction to Angular 2, DevMT Meetup, April 2016 AngularJS (1.x) → Design decisions (not so good) → Web platform evolution More at http://blog.jhades.org/introduction-to-angular2-the-main-goals
  • 27. Introduction to Angular 2, DevMT Meetup, April 2016 Design Decisions → Third-party libraries (interoperability) → Directive Definition Object → $scope and $digest cycles
  • 28. Introduction to Angular 2, DevMT Meetup, April 2016 Web platform evolution → Web Workers → Web Components → ES6, ES7, TypeScript, Dart… → Offline Apps (Service Workers) → Mobile Apps
  • 29. Introduction to Angular 2, DevMT Meetup, April 2016 So, what’s new?
  • 30. Introduction to Angular 2, DevMT Meetup, April 2016 What’s new? Edge Web API Template Syntax Change Detection
  • 31. Introduction to Angular 2, DevMT Meetup, April 2016 Edge Web API x Directives + Content Transclusion✓ Directives + Content Transclusion ✓ Components + Content Projection
  • 32. Introduction to Angular 2, DevMT Meetup, April 2016 Angular 1 Directives + Content Transclusion
  • 33. Introduction to Angular 2, DevMT Meetup, April 2016 Angular 1: Directives + Content Transclusion My Title My Content Property binding Content transclusion <my-card title="My Title"> <p>My Content</p> </my-card>
  • 34. Introduction to Angular 2, DevMT Meetup, April 2016 Property binding Content transclusion Angular 1: Directives + Content Transclusion app.directive('myCard', function() { // ... scope: { title: '@' }, transclude: true });
  • 35. Introduction to Angular 2, DevMT Meetup, April 2016 Property binding Content transclusion <div class="my-card"> <h1>{{ title }}</h1> <div ng-transclude></div> </div> Angular 1: Directives + Content Transclusion
  • 36. Introduction to Angular 2, DevMT Meetup, April 2016 Angular 2 Components + Content Projection
  • 37. Introduction to Angular 2, DevMT Meetup, April 2016 Angular 2: Components + Content Projection Property binding Content transclusion <my-card [title]=“‘My Title’"> <p>My Content</p> </my-card>
  • 38. Introduction to Angular 2, DevMT Meetup, April 2016 Property binding Content transclusion Angular 2: Components + Content Projection <div class="my-card"> <h1>{{ title }}</h1> <content></content> </div>
  • 39. Introduction to Angular 2, DevMT Meetup, April 2016 Property binding Content transclusion Angular 2: Components + Content Projection @Component({ selector: 'my-card', properties: ['title'] }) @View({ // ... encapsulation: ViewEncapsulation.Native }) class MyCard { }
  • 40. Introduction to Angular 2, DevMT Meetup, April 2016 Components Template Directive Controller Component ng1 ng2
  • 41. Introduction to Angular 2, DevMT Meetup, April 2016 Edge Web API ✓ Component encapsulation (emulated or native) ✓ Plain JS Classes + Metadata
 (TypeScript decorators are optionals)
  • 42. Introduction to Angular 2, DevMT Meetup, April 2016 Template Syntax
  • 43. Introduction to Angular 2, DevMT Meetup, April 2016 Angular 1: Template syntax Entry property Entry property Out property <my-card title="{{ title }}" visible="visible" remove="onRemove()"></my-card> scope: { title: '@', visible: '=', on-remote: '&' }
  • 44. Introduction to Angular 2, DevMT Meetup, April 2016 Templates Binding Example Properties Events Two-way https://angular.io/docs/ts/latest/guide/template-syntax.html#!#binding-syntax <input [value]="firstName"> <button (click)="save($event)"> <input [(ng-model)]="firstName">
  • 45. Introduction to Angular 2, DevMT Meetup, April 2016 Angular 2: Template syntax Entry property Entry property Out property properties: [ 'title', 'visible' ] @Output() remove = new EventEmitter(); <my-card [title]=“title" [visible]=“visible” (remove)=“onRemove()”></my-card>
  • 46. Introduction to Angular 2, DevMT Meetup, April 2016 Template Syntax ✓ Simpler API to memorize ✓ Valid HTML ✓ Syntax more semantic
  • 47. Introduction to Angular 2, DevMT Meetup, April 2016 Change Detection ✓ Cyclic graphsx Cyclic graphs ✓ Tree of components
  • 48. Introduction to Angular 2, DevMT Meetup, April 2016 Angular 1: Cyclic graphs x Dirty checking x Unpredictable watchers x Unpredictable digest cycle runs http://blog.jhades.org/introduction-to-angular2-the-main-goals/#howangular1implementsbinding
  • 49. Introduction to Angular 2, DevMT Meetup, April 2016 Angular 2: Tree of components ✓ Predictable watchers ✓ Independent change detector ✓ Switchable strategies for each CD
 (great for immutability) @Component({ changeDetection: ChangeDetectionStrategy.OnPush }) http://victorsavkin.com/post/110170125256/change-detection-in-angular-2
  • 50. Introduction to Angular 2, DevMT Meetup, April 2016 Change Detection ✓ Faster changes detections (3x ~ 5x) ✓ Independent component CD ✓ Switchable change strategies
 (can be more faster yet 3x ~ 8x) ✓ Tree of components
  • 51. Introduction to Angular 2, DevMT Meetup, April 2016 Are we done?
  • 53. Introduction to Angular 2, DevMT Meetup, April 2016 Isomorphic Rendering https://github.com/angular/universal
  • 54. Introduction to Angular 2, DevMT Meetup, April 2016 Web Workers Support ✓ Sandbox untrusted code ✓ Awesome for mobile ✓ Concurrency & Parallelism https://github.com/angular/angular/blob/master/modules/angular2/docs/web_workers/web_workers.md
  • 55. Introduction to Angular 2, DevMT Meetup, April 2016 Unidirectional Data Flow ✓ Easier to debug ✓ Interoperable (RxJS, Flux, Redux…) ✓ Faster
  • 56. Introduction to Angular 2, DevMT Meetup, April 2016 Simpler to Learn
  • 57. Introduction to Angular 2, DevMT Meetup, April 2016 Multi Languages Support
  • 58. Introduction to Angular 2, DevMT Meetup, April 2016 ES5 ES6 TypeScript Dart Multi Languages Support
  • 59. Introduction to Angular 2, DevMT Meetup, April 2016 ES5 ES6 TypeScript Dart No Compile Compile Multi Languages Support
  • 60. Introduction to Angular 2, DevMT Meetup, April 2016 ES5 ES6 TypeScript Dart No Types Types Multi Languages Support
  • 61. Introduction to Angular 2, DevMT Meetup, April 2016 ES5 ES6 TypeScript Dart JavaScript-Based Syntax No JS Multi Languages Support
  • 62. Introduction to Angular 2, DevMT Meetup, April 2016 ES6ES5 TypeScript Dart No JS ES6 JavaScript-Based Syntax Multi Languages Support
  • 63. Introduction to Angular 2, DevMT Meetup, April 2016 TypeScriptES6ES5 Dart No JS TypeScriptES6 JavaScript-Based Syntax Multi Languages Support
  • 64. Introduction to Angular 2, DevMT Meetup, April 2016 Tools
  • 65. Introduction to Angular 2, DevMT Meetup, April 2016 Angular CLI https://github.com/angular/angular-cli
  • 66. Introduction to Angular 2, DevMT Meetup, April 2016
  • 67. Introduction to Angular 2, DevMT Meetup, April 2016 Batarangle ✓ Template navigation ✓ Debugging ✓ Performance analysis http://go.rangle.io/batarangle
  • 69. Introduction to Angular 2, DevMT Meetup, April 2016 Cross Platform
  • 71. Introduction to Angular 2, DevMT Meetup, April 2016 Cross Platform Mobile Web MobileDesktop
  • 72. Introduction to Angular 2, DevMT Meetup, April 2016 Angular Universal Web Workers Mobile Web Material Design
  • 73. Introduction to Angular 2, DevMT Meetup, April 2016 Mobile
  • 74. Introduction to Angular 2, DevMT Meetup, April 2016 Ionic Framework Max Lynch
 Adam Bradley
  • 75. Introduction to Angular 2, DevMT Meetup, April 2016 Ionic Framework ✓ Apps featured by Google & Apple ✓ Battle-tested by lots of startups ✓ 1.2M+ apps built since 02/2014
  • 76. Introduction to Angular 2, DevMT Meetup, April 2016 Ionic v2 built upon Angular 2 ✓ Use modern Web APIs like Web Workers ✓ Express Ionic as a more traditional GUI architecture ✓ Dramatically improve render performance ✓ Reduce the barrier to entry (it’s mostly vanilla javascript) http://ionic.io/2
  • 77. Introduction to Angular 2, DevMT Meetup, April 2016 New features ✓ Material design support ✓ New animation and scrolling ✓ Overhauled navigation ✓ Powerful theming system ✓ New components and templates
  • 78. Introduction to Angular 2, DevMT Meetup, April 2016
  • 79. Introduction to Angular 2, DevMT Meetup, April 2016 The Path to Angular 2
  • 80. Introduction to Angular 2, DevMT Meetup, April 2016 ng1 ng2
  • 81. Introduction to Angular 2, DevMT Meetup, April 2016 ...
  • 82. Introduction to Angular 2, DevMT Meetup, April 2016 ngUpgrade http://blog.thoughtram.io/angular/2015/10/24/upgrading-apps-to-angular-2-using-ngupgrade.html https://github.com/angular/angular/tree/master/modules/playground/src/upgrade
  • 83. Introduction to Angular 2, DevMT Meetup, April 2016 ngUpgrade Left Top Nav Main View 1 1 1 1 1 1 1 1 1 1 1 1 1
  • 84. Introduction to Angular 2, DevMT Meetup, April 2016 ngUpgrade Left Top Nav Main View 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2
  • 85. Introduction to Angular 2, DevMT Meetup, April 2016 Learning Angular 2
  • 86. Introduction to Angular 2, DevMT Meetup, April 2016 Supported Browsers 4.1+ 9, 10, 11
  • 87. Introduction to Angular 2, DevMT Meetup, April 2016 Release Status https://splintercode.github.io/is-angular-2-ready/
  • 88. Introduction to Angular 2, DevMT Meetup, April 2016 Live Demo https://github.com/johnpapa/angular2-tour-of-heroes
  • 90. Introduction to Angular 2, DevMT Meetup, April 2016 Want to talk too? http://devmt.herokuapp.com/ +
  • 91. Introduction to Angular 2, DevMT Meetup, April 2016 http://frontincuiaba.com.br/
  • 92. Introduction to Angular 2, DevMT Meetup, April 2016 http://hackinarena.com.br/
  • 93. Introduction to Angular 2, DevMT Meetup, April 2016 Feedbacks? @dhyegofernando