2

I am trying to migrate my angularjs(1.6) to angular 5. As of now I am focusing over migration of one page and want to go for both frameworks angular js and angular 5 running in same application.

I have gone through various links and found some approaches like going for incremental migration i.e. from angular js to angular 2 then angular 4 later angular 5 ; Modifying the scope syntaxes etc

My query is that should I modify the above scope related syntaxes in my current angular js application or I should create a new angular 2 /5 project and then move my js application code to newly created angular 2/5 app.My application is huge one. Also, I want to use ngUpgrade. Not sure where to use. Pls verify the approach and help in this migration

1
  • This link might help you. But I think you should create a completely new project to be able to edit and upgrade later, that's a good solution Commented May 2, 2018 at 9:44

1 Answer 1

1

'create a new angular 2 /5 project and then move your js application code to newly created angular 2/5 app' is better in my opinion

there are some huge architecture differences between Angularjs and angular2+.

angular.js is a classic MV* architecture framework, you may write code in controllers, services, splitting these files into different folders like a MVC structure.

while angular2+ is a component based framework.you can write app in component based pattern.just like react or vue .although you still can write it as a MVC structure.but remember why you want to refactor your project.

Sign up to request clarification or add additional context in comments.

6 Comments

But my application is a huge one.It will take time to rewrite the entire code.Cant I go live using angular-hybrid approach?
we also had a huge Angularjs project and we refractored it to a react version.what we tried to do was when we got new requirements ,we developed on the new one and moved the old project's funcs to the new project gradually.
did u rewrite the entire code again i.e. old project's functions to the new application? manually using angular 2/react syntaxes?
yeah, we did, it's not that difficult.all you need is some time actually . so why you want to refactor your project? think Angularjs is slow or just wanna use new framework.
yes, we want to use new features of angular 5 and angular js is bit slow.Any idea over the medium.com/contentsquare-engineering-blog/…
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.