将 Angular 4 升级到 Angular 8 [英] Upgrade Angular 4 to Angular 8

查看:38
本文介绍了将 Angular 4 升级到 Angular 8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将我在 Angular 4 上的应用程序升级到 Angular 8?我是否需要制作一个新的 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?

推荐答案

这种情况我已经经历过几次了,每次我最终都会用新版本创建全新的应用程序,然后逐个复制粘贴每个组件.

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) 一旦你开始使用这种方法,升级不需要那么长时间.我只用了几个小时就完成了升级.

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) 通过这样做,你会意识到有很多你不需要的垃圾和不必要的代码/库,你将有机会从现有的应用程序中删除它们,你的应用程序会更干净.

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) 您可以创建全新的 cli 应用程序或使用标准的免费模板.我将 SB Admin 模板用于 angular8 和 bootstrap 4,并且可以轻松设置外观漂亮的新应用程序.您可以在一分钟内下载和设置应用程序并开始添加您的组件 检查这个out - Angular 8 Bootstrap 4 模板

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) 我不明白 angular 升级工具自动升级的应用程序,我的应用程序坏了.我不知道它改变了什么.然后我花了这么长时间一个一个修复问题,仍然无法完全解决.所以最终使用复制/粘贴方法.

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.

希望这会有所帮助.

这篇关于将 Angular 4 升级到 Angular 8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆