Angular2 - getting-ready

Preview:

Citation preview

Getting Ready for Angular2

NGULAR

Nir@500tech.com

Nir Kaufman

AngularJS developer @ 500tech

+Nir@500tech.com

we develop, consult & train AngularJS for startups & enterprises

Angular2 is just around the corner

Nir@500tech.com

START HERE

can we get ready today for the framework of tomorrow?

Nir@500tech.com

Angular2 is a new framework not an update to 1.x

Nir@500tech.com

migration to Angular2 will require significant refactoring

Nir@500tech.com

is there anything we can do with our existing code that will make the

migration less painful?

Nir@500tech.com

let’s take a working app and make it Angular2 ready

Nir@500tech.com

we will use the todoMVC Angular version as our

example app

Nir@500tech.com

http://todomvc.com/

CODE

https://github.com/nirkaufman/migration-to-angular2

http://tinyurl.com/qjt68mw

Nir@500tech.com

quick overview of our application code

Nir@500tech.com

checkout step-0

improve your code

Nir@500tech.com

1

in the following examples we will treat our small app as

multi-component large one

Nir@500tech.com

a well-written Angular code makes a good start

Nir@500tech.com

adapt common code style and conventions avoid using $scope as much as you can break your app into components prefer services over factories

checkout step-1

upgrade to ES6

Nir@500tech.com

2

Nir@500tech.com

integrate a compiler into the build system use ES6 modules for dependencies use the class syntax (and anything else..)

checkout step-2-modules

every modern framework / library is already there

checkout step-2-classes

our example app is a one-component small app

Nir@500tech.com

checkout step-2-oneComponent

stay tuned

Nir@500tech.com

3

Nir@500tech.com

follow the documents on angular.io site play with the Angular2 developer preview learn ES6 first, take a look at TypeScript after. subscribe to Angular newsletters, blogs etc..

check out the resources.md

checkout step-3-links

learn today = less surprises tomorrow

migrate to Angular2

Nir@500tech.com

4

Nir@500tech.com

migration paths and hopefully some tools probably will be available.

if it possible, clone your app into a separate repository, and dive in…

checkout step-4

take advantage of Angular2 ASAP

final thoughts

Nir@500tech.com

ENDSUMMARY

Nir@500tech.com

Angular2 is gonna be awesome

Nir@500tech.com

instead of being concerned about the migration day

Nir@500tech.com

keep your current Angular code clean & up to date

Nir@500tech.com

Thank you!Q&A