Reputation: 113
I have a question about migrating an AngularJS app to Angular (5 in this case).
I've been reading the official guide but I have some doubts. What I understand in this guide is that you need to migrate from AngularJS app adding libraries of Angular.
However, I'm not sure if is possible to make a new Angular 5 app from scratch and adding some stuff to make it hybrid. It seems that is possible with this guide.
What I need is to migrate an AngularJS app that uses modules (another AngularJS as dependencies) to Angular 5. So the first approach was migrating the main app to Angular 5 and adding the dependencies modules as AngularJS modules (doing some stuff to allow to use they). But I'm not sure if this approach is correct
What do you think is the best approach?
Upvotes: 2
Views: 308
Reputation: 22128
I'm not aware of the project's size and if its in production use at the moment, but lets assume it is.
I would recommend on writing from scratch, in a step by step approach. Start first of all by making sure that angular 1.X code is written in such a way that it will be easy to use it in an angular 5 project:
You would have to maintain two repos (1.X and 5) for quiet some time, but for a personal experience it can be also a great opportunity, to re-design you system to a better one, because now you have a wider view of all the business logic that was changed over time, so you can choose new approaches.
Upvotes: 1