在過去的一週,我一直在試圖配置和使用以下配置啓動一個非常簡單的項目:角2時,Visual Studio 2015年更新1,類型腳本配置
角2時,Visual Studio 2015年更新1,類型腳本配置
我有一個tsconfig.Json在我與以下內容項目的根:
{
"compilerOptions": {
"rootDir": "src",
"outDir": "web/js",
"target": "es5",
"module": "system",
"declaration": false,
"noImplicitAny": false,
"removeComments": true,
"noLib": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"sourceMap": true,
"listFiles": true
},
"exclude": [
"wwwroot",
"node_modules"
],
"filesGlob": [
"app/**/*.ts"
]
}
我可以看到在解決方案資源管理,棱角分明的虛擬項目,並在角度提到安裝所有需要的軟件包。 io 5分鐘教程(https://angular.io/guide/quickstart)。
這是我在我的App.ts:
import {bootstrap, Component} from 'angular2/angular2';
@Component({
selector: 'my-app',
template: '<h1>My First Angular 2 App</h1>'
})
class AppComponent { }
bootstrap(AppComponent);
我得到的錯誤是:
符號「組件不能得到妥善解決,可能是它坐落在一個無法訪問的模塊'
相同的配置工作在VS代碼沒有問題。
如果你能證明我錯過了什麼,我會很感激。
謝謝。
遇到ReSharper的同樣的問題啓用。禁用時,一切都恢復正常。 – suf
你可以找出問題出現的原因,以及如何在底部http:// stackoverflow的downvoted答案中解決問題。com/questions/34592390/visual-studio-2015-update-1-enterprise-with-resharper-10-ultimate-can-be/34598942#34598942 –
我可以證實這個問題已經解決......我用10.1 EAP 7。 –