Date post: | 06-Aug-2015 |
Category: |
Technology |
Upload: | nir-kaufman |
View: | 310 times |
Download: | 0 times |
Nir Kaufman
AngularJS developer @ 500tech
we develop, consult & train AngularJS for startups & enterprises
is there anything we can do with our existing code that will make the
migration less painful?
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