Upload
nir-kaufman
View
312
Download
0
Embed Size (px)
Citation preview
Nir Kaufman
AngularJS developer @ 500tech
we develop, consult & train AngularJS for startups & enterprises
can we get ready today for the framework of tomorrow?
Angular2 is a new framework not an update to 1.x
migration to Angular2 will require significant refactoring
is there anything we can do with our existing code that will make the
migration less painful?
let’s take a working app and make it Angular2 ready
we will use the todoMVC Angular version as our
example app
http://todomvc.com/
CODE
https://github.com/nirkaufman/migration-to-angular2
http://tinyurl.com/qjt68mw
in the following examples we will treat our small app as
multi-component large one
a well-written Angular code makes a good start
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
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
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
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
Angular2 is gonna be awesome
instead of being concerned about the migration day
keep your current Angular code clean & up to date
Thank you!Q&A