简体   繁体   中英

Upgrade Angular 4 to Angular 8

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?

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/

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM