-3

I have developed an application using javascript,php,html with a lot of ajax calls . I was planning to convert this entire application to angular 7. Is it possible to do this without re-doing the entire application from scratch in angular ? If this is possible,could you please tell me how to get started with this? Thank you

3 Answers3

0

No. It's always better to rewrite the entire application. But the effort you put to that will be worth it. You can start by creating a new angular application and adding your code module by module

Seba Cherian
  • 1,755
  • 6
  • 18
0

It is a manual process and you would have to re-do it from scratch.

There are many examples online: Here is one

Lala
  • 29
  • 6
0

As Angular is a complete framework and not just a library, it has it's very own concepts. So even if you might be able to "squeeze" some of your javascript code into the angular application, it wouldn't be a clean solution.

One example would be how you access DOM elements in javascript and angular: the javascript approach with getElementById() etc. works, but it's not the way recommended by angular. (Example: document.getElementById replacement in angular4 / typescript?)

So like other answers already suggest, a mostly automatic conversion is not possible. But you can still transform your existing concept and ideas of you current app to a new angular app.

StefanK
  • 97
  • 3
  • 11