ng update to specific Angular version

前端 未结 5 1078
感情败类
感情败类 2020-12-18 18:13

I would like to update Angular from version 5.0 to version 6.1. The instructions at https://update.angular.io/ suggest using ng update @angular/core to update.

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-18 18:44

    Adding this here, since this comes up in search results and the answers provided here didn't work for me.

    What worked for me was using ng update @angular/core@7.0.0. This should probably be noted in the Angular Update Guide (https://update.angular.io/), but it's not. Since that page throws a notice up when upgrading across more than one major version at a time, but using the recommended command ng update @angular/core upgrades to the latest release (which could be across more than one major version), perhaps this should be changed.

提交回复
热议问题