Upgrade Angular 4 to Angular 8

我只是一个虾纸丫 提交于 2020-12-12 06:10:49

问题


How can I upgrade my application on Angular 4 to Angular 8? Should I need to make a new angular 8 application and copy paste every components and change accordingly or is there any other suitable method?


回答1:


I have been through this few times and every time I end up creating brand new app with new version, then copy paste each component one-by-one.

1) Once you start with this approach, It doesn’t take that long to upgrade. It took me only couple of hours to upgrade.

2) By doing this, you will realize that there is lot of junk and unnecessary code/libraries that you don’t need and you will have chance to take it out from your existing app and your app will be more cleaner.

3) You can create brand new cli app or use standard free template. I use SB Admin template for angular8 and bootstrap 4 and can easily setup new app with beautiful looks. You can download and setup app in a minute and start adding your components Check this out - Angular 8 Bootstrap 4 template

3) I don’t understand automatically upgraded app by angular upgrade tool and my app was broken. I don’t know what it changed. Then it took me so long to fix issues one by one and still couldn’t resolve it completely. So ended up using copy/paste method.

Hope this helps.




回答2:


From what I checked the angular web site does not recommend to upgrade from major version. It will be better to move from one version to another version wise one by one.

Check out the link for more answer. https://update.angular.io/



来源:https://stackoverflow.com/questions/59807933/upgrade-angular-4-to-angular-8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!