Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 324
Basu Dev Adhikari Avatar asked Jan 27 '26 01:01

Basu Dev Adhikari


2 Answers

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.

like image 196
Chirag Avatar answered Jan 29 '26 13:01

Chirag


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.

enter image description here Check out the link for more answer. https://update.angular.io/

like image 43
Sats Avatar answered Jan 29 '26 15:01

Sats



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!