After spending the last week attempting to set up and launch a simple project, I am using the following configuration:
Angular 2, Visual Studio 2015 update 1, TypeScript Configuration
In the root of my project, I have a tsconfig.Json file with the following contents:
{
"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"
]
}
I can see the virtual project in Solution Explorer, angular and all required packages are installed as mentioned in the angular.io 5 minute tutorial (https://angular.io/guide/quickstart).
This is what I have in my App.ts:
import {bootstrap, Component} from 'angular2/angular2';
@Component({
selector: 'my-app',
template: '<h1>My First Angular 2 App</h1>'
})
class AppComponent { }
bootstrap(AppComponent);
The error message I'm encountering reads:
Symbol 'component cannot be properly resolved, probably it's located in an inaccessible module'
The same configuration works in VS Code without any issues.
I would greatly appreciate it if you could point out what I might be missing.
Thank you.