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
-
1Not possible. Angular is a javascript framework which handles ajax calls in different way when compare to javascript. – selvakumar Mar 28 '19 at 09:07
-
2You cannot directly convert that into angular. You have to rewrite the application using angular – Ropali Munshi Mar 28 '19 at 09:08
-
1Short answer, NO, is not possible, you'll need to do a lot of things. – Óscar Andreu Mar 28 '19 at 09:09
-
Of course it's possible. By re-writing the entire application. By hand, because there is no automated way to convert the code. – VLAZ Mar 28 '19 at 09:20
-
Thank you all :) – Nischith Naik Mar 28 '19 at 15:30
3 Answers
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

- 1,755
- 6
- 18
It is a manual process and you would have to re-do it from scratch.
There are many examples online: Here is one

- 29
- 6
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.

- 97
- 3
- 11