For the past week I have been trying to configure and start a very simple project using the following config:
Angular 2, Visual studio 2015 update 1, Type Script Configuration
I have a tsconfig.Json in root of my project with following content:
{
"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 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 I'm getting is:
Symbol 'component can not be properly resolved, probably its located in an inaccessible module'
Same config works in VS Code with no issues.
I would be thankful if you can show what am I missing.
Thanks.