升级Angular2 到 Angular4

来源:互联网 发布:家长控制电脑软件 编辑:程序博客网 时间:2024/07/17 21:46

根据官方文档,执行以下操作即可完成升级工作:

Updating to 4.0.0


On Linux/Mac:
npm install @angular/{common,compiler,compiler-cli,core,forms,http,platform-browser,platform-browser-dynamic,platform-server,router,animations}@latest typescript@latest --save

On Windows:
npm install @angular/common@latest @angular/compiler@latest @angular/compiler-cli@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 @angular/animations@latest typescript@latest --save


参考如下:

http://angularjs.blogspot.kr/2017/03/angular-400-now-available.html