Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
The awesomeness of Angular 2
Search
Ciro Nunes
April 24, 2015
Programming
14
21k
The awesomeness of Angular 2
Demo:
http://github.com/cironunes/cart2
Ciro Nunes
April 24, 2015
Tweet
Share
More Decks by Ciro Nunes
See All by Ciro Nunes
Rust Front-end with Yew
cironunes
0
46
Type safe CSS with Reason
cironunes
0
100
What I've learned building automated docs for Ansarada's design system
cironunes
0
66
Beyond ng new
cironunes
2
200
Animate your Angular apps
cironunes
0
410
Sweet Angular, good forms never felt so good
cironunes
0
64
Sweet Angular, good forms never felt so good
cironunes
0
280
Progressive Angular apps
cironunes
3
880
Angular: Um framework. Mobile & desktop.
cironunes
1
580
Other Decks in Programming
See All in Programming
Compose Hot Reload is here, stop re-launching your apps! (Android Makers 2025)
zsmb
1
580
State of Namespace
tagomoris
5
2.2k
Memory API : Patterns, Performance et Cas d'Utilisation
josepaumard
1
150
新しいPHP拡張モジュールインストール方法「PHP Installer for Extensions (PIE)」を使ってみよう!
cocoeyes02
0
440
Bedrock × Confluenceで簡単(?)社内RAG
iharuoru
1
100
Jakarta EE Meets AI
ivargrimstad
0
510
VitestのIn-Source Testingが便利
taro28
8
2.3k
Glue Studio Visual ETL実装時にハマったこと
kokitamura
0
100
AIコーディングの理想と現実
tomohisa
33
36k
Dissecting and Reconstructing Ruby Syntactic Structures
ydah
2
1.4k
Thank you <💅>, What's the Next?
ahoxa
1
570
RubyKaigi Dev Meeting 2025
tenderlove
1
790
Featured
See All Featured
The Invisible Side of Design
smashingmag
299
50k
Faster Mobile Websites
deanohume
306
31k
KATA
mclloyd
29
14k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
45
9.5k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
47
2.7k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
23
2.7k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
19
1.2k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.4k
StorybookのUI Testing Handbookを読んだ
zakiyama
29
5.7k
Speed Design
sergeychernyshev
29
910
Building a Modern Day E-commerce SEO Strategy
aleyda
40
7.2k
Transcript
The Awesomeness of Angular 2
Ciro Nunes FRONT-END ENGINEER @cironunesdev / +cironunesdev / cironunes.com
Belo Horizonte - MG
None
None
None
The Awesomeness of Angular 2
but before…
The current state of Angular 1.x
15k+ forks angular/angular.js 1.2k+ contributors 37k+ stars Angular 1.x
1.4 New Router New I18n CommonJS support Better animation support
Performance improvements
Angular 2 ready 1.4 New Router New I18n CommonJS support
Better animation support Performance improvements
Angular 1.4 is the best Angular yet
1.5 is coming soon
The Awesomeness of Angular 2
None
None
Why a brand new version?
2009
None
2015
None
None
Reasons for a brand new version
Evolving web Reasons for a brand new version
Evolving web Reasons for a brand new version Focus
The awesomeness of Angular 2
Change detection The awesomeness of Angular 2
Change detection The awesomeness of Angular 2 Benefits of using
ES6
Change detection The awesomeness of Angular 2 Benefits of using
ES6 Template syntax
Disclaimer Angular 2 is currently in Alpha Preview
Change detection
Performance issues
None
None
Faster by nature Easier to reason about Trees
Immutable objects
None
None
Observable objects
None
None
None
None
Configurable 3-10x faster Trees instead of cycling graphs Change detection
http://victorsavkin.com/post/110170125256/change-detection-in-angular-2
Benefits from using ES6
“Classes" Angular 1.x angular.module('myApp') .controller('MyComponent', function() { this.meaningOfLife = 42;
});
Classes Angular 2 class MyComponent { constructor() { this.meaningOfLife =
42; } }
angular.module('myApp', ['myModule']); angular.module('myModule', []); Modules Angular 1
Modules Angular 2 export class MyModule {} import {MyModule} from
'module';
Directives Angular 1 angular.module('myApp') .directive('myComponent', function() { return { template:
'<p>Meaning of life is {{ meaningOfLife }}</p>', bindToController: true, controller: function() { this.meaningOfLife = 42; } }; })
Annotations (optional) @Component({ selector: 'my-component' }) @View({ template: `<p>The meaning
of life is {{ meaningOfLife }}</p>` }) class MyComponent { constructor() { this.meaningOfLife = 42; } }
Types (completely optional) @Component({ selector: 'my-component' }) @View({ template: `<p>The
meaning of life is {{ meaningOfLife }}</p>` }) class MyComponent { meaningOfLife: number; constructor() { this.meaningOfLife = 42; } }
Template syntax
Data-binding
<my-greeting person="Ciro"></my-greeting> <my-greeting person="{{vm.person}}"></my-greeting> <my-greeting person="vm.person"></my-greeting> Binding to components Angular
1
<my-greeting [person]="person"> <my-greeting person="Ciro"> Binding to components Angular 2
Events
<my-greeting greet="vm.smile()"></my-greeting> Angular 1 expression or statement
<my-greeting (greet)="smile()"></my-greeting> Angular 2 expression vs statement <my-greeting [greet]="smile()"></my-greeting>
Toolable Power in the hands of the user Fewer rules
to remember Template syntax Play nice with Web Components
DEMO TIME github.com/cironunes/cart2
Thanks! @cironunesdev / +cironunesdev / cironunes.com