將現有的Angular2 RC2應用升級到RC4需要執行哪些步驟?我更新了我的package.json文件(如下所示),並在根文件夾上運行npm更新,但它仍然引用RC2中節點模塊文件夾中舊角度包的舊版本。需要什麼步驟從Angular2 RC2升級到RC4
我檢查了更改日誌和發佈說明,並搜索谷歌,但無濟於事。該應用程序在引用新的ngModel相關表單功能時運行但崩潰,該功能在RC2中也不起作用。我試圖更新到RC4使用新的表單模塊,看看是否可以解決我的基本形式問題。
原始
"dependencies": {
"@angular/common": "2.0.0-rc.2",
"@angular/compiler": "2.0.0-rc.2",
"@angular/core": "2.0.0-rc.2",
"@angular/forms": "0.1.0",
"@angular/http": "2.0.0-rc.2",
"@angular/platform-browser": "2.0.0-rc.2",
"@angular/platform-browser-dynamic": "2.0.0-rc.2",
"@angular/router": "3.0.0-alpha.7",
"@angular/router-deprecated": "2.0.0-rc.2",
"@angular/upgrade": "2.0.0-rc.2",
修改
"dependencies": {
"@angular/common": "2.0.0-rc.4",
"@angular/compiler": "2.0.0-rc.4",
"@angular/core": "2.0.0-rc.4",
"@angular/forms": "0.2.0",
"@angular/http": "2.0.0-rc.4",
"@angular/platform-browser": "2.0.0-rc.4",
"@angular/platform-browser-dynamic": "2.0.0-rc.4",
"@angular/router": "3.0.0-beta.1",
"@angular/router-deprecated": "2.0.0-rc.2",
"@angular/upgrade": "2.0.0-rc.4",
你是否在爲你的項目使用angular-cli? –
還沒有,但計劃 - 會有幫助嗎? – bUKaneer
angular-cli是一個很棒的工具,我已經將我的代碼從rc1更新到了rc4。沒有問題從我身邊。你可以做'npm install'而不是更新嗎? –