Upgrade Angular version (now: 2.4.3 or 4.0.0-beta.3) following the best practice?

后端 未结 3 1598
鱼传尺愫
鱼传尺愫 2021-02-05 22:48

Now that Angular is following a Semantic Versioning, and Angular2.4.3 were released, I\'m a little confused here on what is the best practice when I upgrade to the next Angular

3条回答
  •  暖寄归人
    2021-02-05 23:34

    I've upgraded my app from Angular 2.4.0 to 4.0.2 without any code changes! Bare in mind, though that it depends of which features/classes/methods you are using.

    I ran

    npm i @angular/common@latest @angular/compiler@latest @angular/core@latest @angular/forms@latest @angular/http@latest @angular/platform-browser@latest @angular/platform-browser-dynamic@latest @angular/platform-server@latest @angular/router@latest typescript@latest --S -E
    

    then

    npm i @angular/compiler-cli@latest --D -E
    

    NOTE: use @latest if you want the latest stable version. Use @next if you want the latest 'bleeding edge' version.

提交回复
热议问题