angular 2 + typescript = true. let's play!

Post on 18-Jan-2017

620 Views

Category:

Technology

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

ANGULAR 2 + TYPESCRIPT = TRUE

SIRAR SALIH SENIOR SOFTWARE ENGINEER

LET’S PLAY!

Last year

“Let this mark the day that I decided to get the hell out of web dev.”

“Is this a joke?”

“Breaking changes and no migration path from 1.x to 2.0. Wait, WHAT?”

“People thought that Python 2.7 -> 3 was bad, but this is much worse.”

Directives

Model Binding

Controllers

Validation

Localization

Testability

Directives

Model Binding

Controllers

Validation

Localization

Testability

Two things

Template Component

Template Component

Forward binding

Template Component

Forward binding

Reverse binding

Data Sharing

Binding

Dependency Injection

Angular 1 has a single root injector

Angular 2 has a hierarchical injector- Lazy loading

- No more string tokens- No more minification issues

- Cleaner and more flexible interface

Built-in Components

You can still use ng-model, but you shouldn’t!

Forms

Component Router- Async loading of components

Migration

• Angular 1 and Angular 2 can run together• ng-upgrade libraries• (Re)Write your Angular 1 app to a component-

like structure- Directive -> Component

• Step-by-step guide:http://angularjs.blogspot.no/2015/08/angular-1-and-angular-2-coexistence.html

• Better performance- 3 to 5 times faster rendering- Template precompilation- View caching- Lower memory usage

• Faster, powerful templating• DI with Lazy loading• Server-side rendering• Web workers

- Isolated threads• Mobile app support• And more to come!

So should you upgrade?The answer is: yes!

Angular 2 SurveryBy Jeff Whelpley & Patrick Stapleton

2100+ ng devs across the world

@SirarSalihsirars@gmail.com

https://github.com/sirarsalihhttp://www.sirarsalih.com/

top related