angular4终于在两天前发布了正式版本,那么怎么升级呢?其实angular2和angular4之间属于平滑过渡,并不像1和2之间颠覆性的重写代码.
npm uninstall -g @angular/cli npm cache clean npm install -g @angular/[email protected] rm -rf node_modules dist # use rmdir /S/Q node_modules dist in Windows Command Prompt; use rm -r -fo node_modules,dist in Windows PowerShell npm install --save-dev @angular/[email protected]
- 升级包
// linux/mac npm install @angular/{common,compiler,compiler-cli,core,forms,http,platform-browser,platform-browser-dynamic,platform-server,router,animations}@latest [email protected] --save // Windows npm install @angular/[email protected] @angular/[email protected] @angular/[email protected] @angular/[email protected] @angular/[email protected] @angular/[email protected] @angular/[email protected] @angular/platform-browser-dynamic@latest @angular/[email protected] @angular/[email protected] @angular/[email protected] [email protected] --save
- 更换一些其他包
npm install [email protected] --save
- 执行安装命令
npm install
时间: 2024-10-14 04:56:41