AngularJS upgrade to Angular

219 views Asked by At

Currently, we have an app build using Angular JS 1.4 version. We wanted to upgrade it to Angular 4 in phases. To start with we wanted to upgrade it to Angular JS 1.5 version to have component api enabled. Next, we wanted to implement new requirements in Angular 4 version. My question is:

Do we need to upgrade all controllers, directives to 1.5 components structure before bootstrapping angular 4? OR only specific controllers/directives that are going to be used along with Angular 4 components?

Are there any recommendation for this?

1

There are 1 answers

0
Serhii Andronik On

Here is decent guide to start https://angular.io/guide/upgrade

1.The Rule of 1 states that there should be one component per file. This not only makes components easy to navigate and find, but will also allow us to migrate them between languages and frameworks one at a time. In this example application, each controller, component, service, and filter is in its own source file. 2.The Folders-by-Feature Structure and Modularity rules define similar principles on a higher level of abstraction: Different parts of the application should reside in different directories and NgModules.

First you will need to migrate to latest AngularJs You can run both frameworks in "hybrid" App https://hackernoon.com/angular-v4-hybrid-upgrade-application-73d5afba1e01