如何将Angular升级到最新版本?

时间:2019-05-08 15:44:40

标签: angular

对于Angular的7.2.x版本,我想使用路由state(也介绍了here),我目前有7.1.1,我尝试在全局和本地卸载和重新安装CLI,但是没有变化,如何升级Angular?

 dependencies": {
"@angular/animations": "^7.2.14",
"@angular/cdk": "^7.3.6",
"@angular/cli": "^7.3.9",
"@angular/common": "^7.1.1",
"@angular/core": "^7.1.1",
"@angular/forms": "^7.1.1",
"@angular/http": "^7.1.1",
"@angular/material": "^7.3.6",
"@angular/router": "^7.1.1",    //This one does not help.
 ....
 },

1 个答案:

答案 0 :(得分:1)

运行以下命令

ng update @angular/cli@7.2.x

以及下面的内容,以了解所有可以更新的内容

ng update