我有使用角2與.NET的WebAPI申請,並決定升級到角4如何判斷我的應用是否從角度2升級到角度4是否成功?
我通過像在cmd爲我的項目目錄中的下列財產以後去(連同安裝缺少的幾次迭代依賴):
npm install @angular/[email protected] @angular/[email protected] @angular/[email protected] @angular/[email protected] @angular/[email protected] @angular/[email protected] @angular/[email protected] @angular/[email protected] @angular/[email protected] @angular/[email protected] @angular/[email protected] [email protected] --save
我最近通過CLI去更新我從角2角應用角度4.現在,有沒有辦法,我確認我的應用程序使用實際的角度4,而不是2?
如果我輸入「NG --version」成有我的項目直接CMD線,然後我得到以下結果:
@angular/cli: 1.2.0
node: 6.10.2
os: win32 x64
@angular/animations: 4.2.5
@angular/common: 4.2.5
@angular/compiler: 4.2.5
@angular/compiler-cli: 4.2.5
@angular/core: 4.2.5
@angular/forms: 4.2.5
@angular/http: 4.2.5
@angular/platform-browser: 4.2.5
@angular/platform-browser-dynamic: 4.2.5
@angular/platform-server: 4.2.5
@angular/router: 4.2.5
@angular/cli: 1.2.0
,如果我跑我的應用程序,然後和看布勞爾開發工具我看到這個在DOM資源管理器:
<html>
<body>
<my-app ng-version="2.4.8" _nghost-vrp-0="">
... other stuff that isn't important
</html>
</body>
所以它看起來像我的應用程序說NG版=「2.4.8」但我CLI說不同?我是否成功升級,如果是的話,瀏覽器開發人員工具中的DOM爲什麼會有不同的說法?
同樣,這是一個.NET WebAPI應用程序,它正在使用angular 2。
是代碼應該原樣在HTML中沒有添加到組件?它不起作用:未處理的承諾拒絕:模板解析錯誤: 無法綁定到'用戶',因爲它不是'用戶配置文件'的已知屬性... 即時猜測意味着我沒有角4在應用程序? –
您需要綁定到ts文件的正確對象。這只是示例角度給出的關於ngIfs和ngFors的新語法 – Surreal
您是否有該文檔的鏈接?我想通過它,並嘗試您的建議 –