SlideShare una empresa de Scribd logo
1 de 49
Descargar para leer sin conexión
The evolution of
Angular 2
@jowe
Johannes Weber
JS Craftsman & Angular Styler
Disclaimer
Angular 2 is still on a developer preview!
Things will/might change!
1. History of Angular
2. Get an overview of Angular 2.0
3. Angualr 2 Features
4. Bridging the gap Between 1.x and 2
Outline
3 weeks
with Angular
1,500 LOC
6 months
x 3 devs
Before
17,000 LOC
feedback
Jan 2010
“We’re designing Angular 2 for the
way the world will look when we
believe folks will use it. In particular,
this means targeting modern browsers
and using ECMAScript 6.”
from the official Angular announcement
https://angular.io
Angular 2
• For “evergreen” Browsers
• Chrome, Firefox, Opera, Safari and IE11
• Chrome on Android, iOS6+, Windows Phone 8+, FF mobile
• Instrumented
• Angular-wide logging service
• diary.js
Angular 2
• Modular
• Every piece of Angular 2 is optional & replacable
• Mobile first, Offline support
• Simplify
• Directives
• Templating
• IDE can validate and analyze
• Performance
• Improve first load time with prerendering
• Superfast change detection
Angular 2
Angular 2.0 is written in TypeScript
You can write your code either in TS, ES6 or ES5
Components
<angular-js-munich-app></angular-js-munich-app>
@Component({
selector: 'angular-js-munich-app',
})
@View({
url: 'angular-js-munich.html'
})
class AngularJSMunichApp {
todos: [string];
constructor() {
this.todos = ['this', 'usergroup', 'is', 'awesome'];
}
}
Annotations
@Component({
selector: 'angular-js-munich-app',
})
@View({
url: 'angular-js-munich.html'
})
customize the components
Annotations in ES5
// Constructor function
function AngularJSMunichApp() { }
// Annotations attached to function
AngularJSMunichApp.annotations = [
new Component({ selector: 'angular-js-munich-app' }),
new View({ url: 'angular-js-munich.html' })
];
customize the components
Controllers
class AngularJSMunichApp {
todos: [string];
constructor() {
this.todos = ['this', 'usergroup', 'is', 'awesome'];
}
addTodo(title: string) {
this.todos.push(title);
}
}
Holds the components JS logic
Controllers in ES5
function AngularJSMunichApp() {
this.todos = ['this', 'usergroup', 'is', 'awesome'];
}
AngularJSMunichApp.prototype.addTodo = function(title) {
this.todos.push(title);
};
Holds the components code
@Component({
selector: 'angular-js-munich-app',
})
@View({
url: 'angular-js-munich.html'
})
class AngularJSMunichApp {
todos: [string];
constructor() {
this.todos = ['this', 'usergroup', 'is', 'awesome'];
}
}
<angular-js-munich-app></angular-js-munich-app>
Components
Template Syntax
Consists of 3 main features
#localVar - Local Variables
[innerText] - Property Binding
(click) - Event Handler
Template Syntax
Consists of 3 main features
<!-- # creates a local variable inside the template -->
<input #textbox>
<!-- (event) registers an event handler -->
<button (click)="addTodo(textbox.value)"> Add </button>
<!-- [property] binds a value to a property of a DOM element or
component -->
<div [innertext]="textbox.value"></div>
Template Syntax
Nofity about errors immediately
<!-- # creates a local variable inside the template -->
<input #textbox>
<!-- (event) registers an event handler -->
<button (clikc)="addtodo(textbox.value)"> Add </button>
<!-- [property] binds a value to a property of a DOM element or
component -->
<div [innertext]="textBox.value"></div>
Template Syntax
Nofity about errors immediately
Features
Features...
● HTTP
○ retry
○ danymic Error handling
○ short polling, etc.
● WebSockets
● Broswer Storage
○ IndexedDB
○ LocalStorage
○ Session Storage
● Service Workers
● Angular 2 Data handling
● Observables
● Change Detection
○ Immutable, Mutable &
Observable
● Promises vs. Observables
● Forms
● Formatters
There is no migration
path to 2.0
There is no migration
path to 2.0
are some
Migration path
Apply Angular 2 concepts in
Angular 1
Step 1 - Alignment
1.
x
1.
x
myApp
A
CB
ED
myApp
Step 1 - Alignment
1.
x
1.
x
myApp
A
CB
ED
myApp
Component
Router
ng2-now
Step 2 - Migration
1.
x
2.
0
myAppmyApp
A
CB
ED
A
CB
ED
ES6
Migrating your code to ES6 is easier than you think.
ES5 Angular 1 Service
It’s better with ES6!
Angular 2 Service
1. Do 5 min quickstart at
angular.io
2. Try sample code at
learnangular2.com
3. Ask questions at gitter.
im/angular/angular
BTW: Services, Factories, … ?
• They are all gone!
• Replaced by (ES6) Classes
• simpler definition
• DI still available
Upgrade to the latest
stable Version
Future of Angular 1.x
Shorter release cycles
Thank you!
Further Questions?
Tweet me: @jowe
Links
Performance
● Gleb’s Angular 1.x performance guide bit.ly/ng-
gleb
● Is Angular Fast Enough? whlp.ly/ng-fast-
enough
● React + Angular = Speed bit.ly/ng-react-speed
Learning
● A1 Link Collection https://goo.gl/86V7k
● A2 Link Collection bit.ly/ng2-links
● Angular 2 mental model bit.ly/ng2-mental-
model
● Igor’s ng-conf keynote bit.ly/ngconf-igor
● Misko’s ng-conf keynote bit.ly/ngconf-misko
● Simple examples learnangular2.com
● Core concept behind A2 http://goo.gl/GTfKii
● Exploring ES6 Classes in A1 http://goo.
gl/znSSs1
Ability to Reason
● Component-Driven Angular https://goo.
gl/EoCcfL
Talks
● ng-conf 2015 Talks https://goo.gl/nx8YR3
● ng-vegas 2015 Talks https://goo.gl/RR6rCU
Rendering
● Isomorphic Angular whlp.ly/isomorphic-
angular
● NG2 Rendering Architecture https://goo.
gl/mcFjSe
● NG2 Server Rendering whlp.ly/ng2-server-
rendering
● NG2 Native Script https://goo.gl/BVADyc
Migration
● Angular 1.3 meets 2.0 bit.ly/ngconf-migration
● NG2 Now bit.ly/ng2-now
Angular 2 Change Detection
● Change Detection in A2 http://goo.gl/j3H8bV
● Change Deteciton Draft https://goo.gl/80tmGF
● Untra Fast CD https://goo.gl/ndfulh
● CD reinvented https://goo.gl/ffomFS
Typescript
● Difference between Annotations and Decorators
http://goo.gl/KJE4cx
● Learn TypeScript http://goo.gl/HSBT1Q

Más contenido relacionado

La actualidad más candente

What’s new in angular 2
What’s new in angular 2What’s new in angular 2
What’s new in angular 2
Ran Wahle
 

La actualidad más candente (20)

AngularJS2 / TypeScript / CLI
AngularJS2 / TypeScript / CLIAngularJS2 / TypeScript / CLI
AngularJS2 / TypeScript / CLI
 
Angular 2: core concepts
Angular 2: core conceptsAngular 2: core concepts
Angular 2: core concepts
 
Angular 2 Crash Course
Angular  2 Crash CourseAngular  2 Crash Course
Angular 2 Crash Course
 
Building Universal Applications with Angular 2
Building Universal Applications with Angular 2Building Universal Applications with Angular 2
Building Universal Applications with Angular 2
 
Angular 2 + TypeScript = true. Let's Play!
Angular 2 + TypeScript = true. Let's Play!Angular 2 + TypeScript = true. Let's Play!
Angular 2 + TypeScript = true. Let's Play!
 
Angular2 intro
Angular2 introAngular2 intro
Angular2 intro
 
Introduction to Angular 2
Introduction to Angular 2Introduction to Angular 2
Introduction to Angular 2
 
What’s new in angular 2
What’s new in angular 2What’s new in angular 2
What’s new in angular 2
 
Angular 2 overview
Angular 2 overviewAngular 2 overview
Angular 2 overview
 
Adventures with Angular 2
Adventures with Angular 2Adventures with Angular 2
Adventures with Angular 2
 
Angular 2 - An Introduction
Angular 2 - An IntroductionAngular 2 - An Introduction
Angular 2 - An Introduction
 
Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016
Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016
Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016
 
Angular 2
Angular 2Angular 2
Angular 2
 
Introduction to Angular 2
Introduction to Angular 2Introduction to Angular 2
Introduction to Angular 2
 
An Intro to Angular 2
An Intro to Angular 2An Intro to Angular 2
An Intro to Angular 2
 
Tech Webinar: Angular 2, Introduction to a new framework
Tech Webinar: Angular 2, Introduction to a new frameworkTech Webinar: Angular 2, Introduction to a new framework
Tech Webinar: Angular 2, Introduction to a new framework
 
Introduction to Angular 2
Introduction to Angular 2Introduction to Angular 2
Introduction to Angular 2
 
Introduction to angular 2
Introduction to angular 2Introduction to angular 2
Introduction to angular 2
 
Getting Started with Angular 2
Getting Started with Angular 2Getting Started with Angular 2
Getting Started with Angular 2
 
Angular 2
Angular 2Angular 2
Angular 2
 

Destacado

Destacado (18)

Angular js 2
Angular js 2Angular js 2
Angular js 2
 
Migrating an application from Angular 1 to Angular 2
Migrating an application from Angular 1 to Angular 2 Migrating an application from Angular 1 to Angular 2
Migrating an application from Angular 1 to Angular 2
 
AngularJS2
AngularJS2AngularJS2
AngularJS2
 
Angular 2 for Java Developers
Angular 2 for Java DevelopersAngular 2 for Java Developers
Angular 2 for Java Developers
 
Angular2.0@Shanghai0319
Angular2.0@Shanghai0319Angular2.0@Shanghai0319
Angular2.0@Shanghai0319
 
Web Components mit Polymer und AngularJS 1.x
Web Components mit Polymer und AngularJS 1.xWeb Components mit Polymer und AngularJS 1.x
Web Components mit Polymer und AngularJS 1.x
 
Xamarin.forms
Xamarin.forms Xamarin.forms
Xamarin.forms
 
Pt xug xamarin pratices on big ui consumer apps
Pt xug  xamarin pratices on big ui consumer appsPt xug  xamarin pratices on big ui consumer apps
Pt xug xamarin pratices on big ui consumer apps
 
Code migration from Angular 1.x to Angular 2.0
Code migration from Angular 1.x to Angular 2.0Code migration from Angular 1.x to Angular 2.0
Code migration from Angular 1.x to Angular 2.0
 
The Art of Angular in 2016 - vJUG24
The Art of Angular in 2016 - vJUG24The Art of Angular in 2016 - vJUG24
The Art of Angular in 2016 - vJUG24
 
Quick View of Angular JS for High School
Quick View of Angular JS for High SchoolQuick View of Angular JS for High School
Quick View of Angular JS for High School
 
Cassandra Day Atlanta 2015: Feeding Solr at Large Scale with Apache Cassandra
Cassandra Day Atlanta 2015: Feeding Solr at Large Scale with Apache CassandraCassandra Day Atlanta 2015: Feeding Solr at Large Scale with Apache Cassandra
Cassandra Day Atlanta 2015: Feeding Solr at Large Scale with Apache Cassandra
 
Sofea in a soa ecosystem v0 4
Sofea in a soa ecosystem v0 4Sofea in a soa ecosystem v0 4
Sofea in a soa ecosystem v0 4
 
Get satrted angular js day 2
Get satrted angular js day 2Get satrted angular js day 2
Get satrted angular js day 2
 
Angular 2 observables
Angular 2 observablesAngular 2 observables
Angular 2 observables
 
Angular js
Angular jsAngular js
Angular js
 
Get satrted angular js
Get satrted angular jsGet satrted angular js
Get satrted angular js
 
Jws masterclass progressive web apps
Jws masterclass progressive web appsJws masterclass progressive web apps
Jws masterclass progressive web apps
 

Similar a The evolution of Angular 2 @ AngularJS Munich Meetup #5

Similar a The evolution of Angular 2 @ AngularJS Munich Meetup #5 (20)

Angular
AngularAngular
Angular
 
El viaje de Angular1 a Angular2
El viaje de Angular1 a Angular2El viaje de Angular1 a Angular2
El viaje de Angular1 a Angular2
 
Angular.ppt
Angular.pptAngular.ppt
Angular.ppt
 
Angular js 2.0 beta
Angular js 2.0 betaAngular js 2.0 beta
Angular js 2.0 beta
 
Web tools - angular js
Web tools - angular jsWeb tools - angular js
Web tools - angular js
 
Angular%201%20to%20angular%202
Angular%201%20to%20angular%202Angular%201%20to%20angular%202
Angular%201%20to%20angular%202
 
Reason to choose Angular JS for your Web Application
Reason to choose Angular JS for your Web ApplicationReason to choose Angular JS for your Web Application
Reason to choose Angular JS for your Web Application
 
From MEAN to the MERN Stack
From MEAN to the MERN StackFrom MEAN to the MERN Stack
From MEAN to the MERN Stack
 
26 top angular 8 interview questions to know in 2020 [www.full stack.cafe]
26 top angular 8 interview questions to know in 2020   [www.full stack.cafe]26 top angular 8 interview questions to know in 2020   [www.full stack.cafe]
26 top angular 8 interview questions to know in 2020 [www.full stack.cafe]
 
Angular 2 - How we got here?
Angular 2 - How we got here?Angular 2 - How we got here?
Angular 2 - How we got here?
 
Angular 2 interview questions and answers
Angular 2 interview questions and answersAngular 2 interview questions and answers
Angular 2 interview questions and answers
 
Angular meetup 2 2019-08-29
Angular meetup 2   2019-08-29Angular meetup 2   2019-08-29
Angular meetup 2 2019-08-29
 
Angular 2.0
Angular  2.0Angular  2.0
Angular 2.0
 
Angular 2 - Better or worse
Angular 2 - Better or worseAngular 2 - Better or worse
Angular 2 - Better or worse
 
Santa Barbara AngularJS intro to 1.3
Santa Barbara AngularJS intro to 1.3Santa Barbara AngularJS intro to 1.3
Santa Barbara AngularJS intro to 1.3
 
Coffee@DBG - Exploring Angular JS
Coffee@DBG - Exploring Angular JSCoffee@DBG - Exploring Angular JS
Coffee@DBG - Exploring Angular JS
 
Brief introduction to Angular 2.0 & 4.0
Brief introduction to Angular 2.0 & 4.0Brief introduction to Angular 2.0 & 4.0
Brief introduction to Angular 2.0 & 4.0
 
Commit University - Exploring Angular 2
Commit University - Exploring Angular 2Commit University - Exploring Angular 2
Commit University - Exploring Angular 2
 
ME vs WEB - AngularJS Fundamentals
ME vs WEB - AngularJS FundamentalsME vs WEB - AngularJS Fundamentals
ME vs WEB - AngularJS Fundamentals
 
Angular
AngularAngular
Angular
 

Más de Johannes Weber

Facebook, Google, Youtube & co
Facebook, Google, Youtube & coFacebook, Google, Youtube & co
Facebook, Google, Youtube & co
Johannes Weber
 
User centered design - Personas
User centered design - PersonasUser centered design - Personas
User centered design - Personas
Johannes Weber
 
Usability Test Inlandsüberweisung
Usability Test InlandsüberweisungUsability Test Inlandsüberweisung
Usability Test Inlandsüberweisung
Johannes Weber
 
Paper: Steuerung öffentlicher Screens
Paper: Steuerung öffentlicher ScreensPaper: Steuerung öffentlicher Screens
Paper: Steuerung öffentlicher Screens
Johannes Weber
 
Steuerung öffentlicher Screens
Steuerung öffentlicher ScreensSteuerung öffentlicher Screens
Steuerung öffentlicher Screens
Johannes Weber
 
Customer Centered Design
Customer Centered DesignCustomer Centered Design
Customer Centered Design
Johannes Weber
 
Hardware Usability Testing
Hardware Usability TestingHardware Usability Testing
Hardware Usability Testing
Johannes Weber
 
Projektmanagement & Innovation
Projektmanagement & InnovationProjektmanagement & Innovation
Projektmanagement & Innovation
Johannes Weber
 

Más de Johannes Weber (20)

Progressive Web Apps - Intro & Learnings
Progressive Web Apps - Intro & LearningsProgressive Web Apps - Intro & Learnings
Progressive Web Apps - Intro & Learnings
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
 
Formular handling in AngularJS
Formular handling in AngularJSFormular handling in AngularJS
Formular handling in AngularJS
 
AngularJS Munich Meetup #7 - Intro
AngularJS Munich Meetup #7 - IntroAngularJS Munich Meetup #7 - Intro
AngularJS Munich Meetup #7 - Intro
 
#perfmatters - Optimizing the Critical Rendering Path
#perfmatters - Optimizing the Critical Rendering Path#perfmatters - Optimizing the Critical Rendering Path
#perfmatters - Optimizing the Critical Rendering Path
 
LeanJS - Lean startup with JavaScript
LeanJS - Lean startup with JavaScriptLeanJS - Lean startup with JavaScript
LeanJS - Lean startup with JavaScript
 
A Story about AngularJS modularization development
A Story about AngularJS modularization developmentA Story about AngularJS modularization development
A Story about AngularJS modularization development
 
Debugging War Stories & Strategies to Survive on RejectJS 2014
Debugging War Stories & Strategies to Survive on RejectJS 2014Debugging War Stories & Strategies to Survive on RejectJS 2014
Debugging War Stories & Strategies to Survive on RejectJS 2014
 
Updated: Fiese Fallstricke, sexy Strategien
Updated: Fiese Fallstricke, sexy StrategienUpdated: Fiese Fallstricke, sexy Strategien
Updated: Fiese Fallstricke, sexy Strategien
 
AngularJS with RequireJS
AngularJS with RequireJSAngularJS with RequireJS
AngularJS with RequireJS
 
Responsive Webdesign: Fiese Fallstricke und sexy Strategien
Responsive Webdesign: Fiese Fallstricke und sexy StrategienResponsive Webdesign: Fiese Fallstricke und sexy Strategien
Responsive Webdesign: Fiese Fallstricke und sexy Strategien
 
Facebook, Google, Youtube & co
Facebook, Google, Youtube & coFacebook, Google, Youtube & co
Facebook, Google, Youtube & co
 
User centered design - Personas
User centered design - PersonasUser centered design - Personas
User centered design - Personas
 
jQuery Performance
jQuery PerformancejQuery Performance
jQuery Performance
 
Usability Test Inlandsüberweisung
Usability Test InlandsüberweisungUsability Test Inlandsüberweisung
Usability Test Inlandsüberweisung
 
Paper: Steuerung öffentlicher Screens
Paper: Steuerung öffentlicher ScreensPaper: Steuerung öffentlicher Screens
Paper: Steuerung öffentlicher Screens
 
Steuerung öffentlicher Screens
Steuerung öffentlicher ScreensSteuerung öffentlicher Screens
Steuerung öffentlicher Screens
 
Customer Centered Design
Customer Centered DesignCustomer Centered Design
Customer Centered Design
 
Hardware Usability Testing
Hardware Usability TestingHardware Usability Testing
Hardware Usability Testing
 
Projektmanagement & Innovation
Projektmanagement & InnovationProjektmanagement & Innovation
Projektmanagement & Innovation
 

Último

在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
ydyuyu
 
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
nirzagarg
 
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Chandigarh Call girls 9053900678 Call girls in Chandigarh
 
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 

Último (20)

"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
 
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
 
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
 
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf
 
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
 
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
 
Microsoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftMicrosoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck Microsoft
 
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
 
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
 
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
 
Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...
Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...
Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...
 
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
 
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
 
Real Escorts in Al Nahda +971524965298 Dubai Escorts Service
Real Escorts in Al Nahda +971524965298 Dubai Escorts ServiceReal Escorts in Al Nahda +971524965298 Dubai Escorts Service
Real Escorts in Al Nahda +971524965298 Dubai Escorts Service
 
Al Barsha Night Partner +0567686026 Call Girls Dubai
Al Barsha Night Partner +0567686026 Call Girls  DubaiAl Barsha Night Partner +0567686026 Call Girls  Dubai
Al Barsha Night Partner +0567686026 Call Girls Dubai
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
 
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
 
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
 

The evolution of Angular 2 @ AngularJS Munich Meetup #5

  • 3. Disclaimer Angular 2 is still on a developer preview! Things will/might change!
  • 4. 1. History of Angular 2. Get an overview of Angular 2.0 3. Angualr 2 Features 4. Bridging the gap Between 1.x and 2 Outline
  • 5. 3 weeks with Angular 1,500 LOC 6 months x 3 devs Before 17,000 LOC feedback
  • 6.
  • 8. “We’re designing Angular 2 for the way the world will look when we believe folks will use it. In particular, this means targeting modern browsers and using ECMAScript 6.” from the official Angular announcement
  • 10. Angular 2 • For “evergreen” Browsers • Chrome, Firefox, Opera, Safari and IE11 • Chrome on Android, iOS6+, Windows Phone 8+, FF mobile • Instrumented • Angular-wide logging service • diary.js
  • 11. Angular 2 • Modular • Every piece of Angular 2 is optional & replacable • Mobile first, Offline support • Simplify • Directives • Templating • IDE can validate and analyze • Performance • Improve first load time with prerendering • Superfast change detection
  • 12.
  • 13.
  • 14.
  • 15. Angular 2 Angular 2.0 is written in TypeScript You can write your code either in TS, ES6 or ES5
  • 16.
  • 17. Components <angular-js-munich-app></angular-js-munich-app> @Component({ selector: 'angular-js-munich-app', }) @View({ url: 'angular-js-munich.html' }) class AngularJSMunichApp { todos: [string]; constructor() { this.todos = ['this', 'usergroup', 'is', 'awesome']; } }
  • 19. Annotations in ES5 // Constructor function function AngularJSMunichApp() { } // Annotations attached to function AngularJSMunichApp.annotations = [ new Component({ selector: 'angular-js-munich-app' }), new View({ url: 'angular-js-munich.html' }) ]; customize the components
  • 20. Controllers class AngularJSMunichApp { todos: [string]; constructor() { this.todos = ['this', 'usergroup', 'is', 'awesome']; } addTodo(title: string) { this.todos.push(title); } } Holds the components JS logic
  • 21. Controllers in ES5 function AngularJSMunichApp() { this.todos = ['this', 'usergroup', 'is', 'awesome']; } AngularJSMunichApp.prototype.addTodo = function(title) { this.todos.push(title); }; Holds the components code
  • 22. @Component({ selector: 'angular-js-munich-app', }) @View({ url: 'angular-js-munich.html' }) class AngularJSMunichApp { todos: [string]; constructor() { this.todos = ['this', 'usergroup', 'is', 'awesome']; } } <angular-js-munich-app></angular-js-munich-app> Components
  • 23. Template Syntax Consists of 3 main features #localVar - Local Variables [innerText] - Property Binding (click) - Event Handler
  • 24. Template Syntax Consists of 3 main features <!-- # creates a local variable inside the template --> <input #textbox> <!-- (event) registers an event handler --> <button (click)="addTodo(textbox.value)"> Add </button> <!-- [property] binds a value to a property of a DOM element or component --> <div [innertext]="textbox.value"></div>
  • 25. Template Syntax Nofity about errors immediately <!-- # creates a local variable inside the template --> <input #textbox> <!-- (event) registers an event handler --> <button (clikc)="addtodo(textbox.value)"> Add </button> <!-- [property] binds a value to a property of a DOM element or component --> <div [innertext]="textBox.value"></div>
  • 26. Template Syntax Nofity about errors immediately
  • 28.
  • 29. Features... ● HTTP ○ retry ○ danymic Error handling ○ short polling, etc. ● WebSockets ● Broswer Storage ○ IndexedDB ○ LocalStorage ○ Session Storage ● Service Workers ● Angular 2 Data handling ● Observables ● Change Detection ○ Immutable, Mutable & Observable ● Promises vs. Observables ● Forms ● Formatters
  • 30. There is no migration path to 2.0
  • 31.
  • 32. There is no migration path to 2.0 are some
  • 34. Apply Angular 2 concepts in Angular 1
  • 35. Step 1 - Alignment 1. x 1. x myApp A CB ED myApp
  • 36. Step 1 - Alignment 1. x 1. x myApp A CB ED myApp Component Router ng2-now
  • 37. Step 2 - Migration 1. x 2. 0 myAppmyApp A CB ED A CB ED
  • 38. ES6 Migrating your code to ES6 is easier than you think.
  • 39. ES5 Angular 1 Service
  • 42.
  • 43. 1. Do 5 min quickstart at angular.io 2. Try sample code at learnangular2.com 3. Ask questions at gitter. im/angular/angular
  • 44. BTW: Services, Factories, … ? • They are all gone! • Replaced by (ES6) Classes • simpler definition • DI still available
  • 45. Upgrade to the latest stable Version
  • 49. Links Performance ● Gleb’s Angular 1.x performance guide bit.ly/ng- gleb ● Is Angular Fast Enough? whlp.ly/ng-fast- enough ● React + Angular = Speed bit.ly/ng-react-speed Learning ● A1 Link Collection https://goo.gl/86V7k ● A2 Link Collection bit.ly/ng2-links ● Angular 2 mental model bit.ly/ng2-mental- model ● Igor’s ng-conf keynote bit.ly/ngconf-igor ● Misko’s ng-conf keynote bit.ly/ngconf-misko ● Simple examples learnangular2.com ● Core concept behind A2 http://goo.gl/GTfKii ● Exploring ES6 Classes in A1 http://goo. gl/znSSs1 Ability to Reason ● Component-Driven Angular https://goo. gl/EoCcfL Talks ● ng-conf 2015 Talks https://goo.gl/nx8YR3 ● ng-vegas 2015 Talks https://goo.gl/RR6rCU Rendering ● Isomorphic Angular whlp.ly/isomorphic- angular ● NG2 Rendering Architecture https://goo. gl/mcFjSe ● NG2 Server Rendering whlp.ly/ng2-server- rendering ● NG2 Native Script https://goo.gl/BVADyc Migration ● Angular 1.3 meets 2.0 bit.ly/ngconf-migration ● NG2 Now bit.ly/ng2-now Angular 2 Change Detection ● Change Detection in A2 http://goo.gl/j3H8bV ● Change Deteciton Draft https://goo.gl/80tmGF ● Untra Fast CD https://goo.gl/ndfulh ● CD reinvented https://goo.gl/ffomFS Typescript ● Difference between Annotations and Decorators http://goo.gl/KJE4cx ● Learn TypeScript http://goo.gl/HSBT1Q