包括TypeScript编译上下文中的app.component.ts

我已经build立了一个Angular2项目跟随Angular2文档当我想从@angular/core打字稿导入Component给我这个错误

TypeScript编译上下文中不包含文件“C:/sendbox/mean/client/app/app.component.ts”。 如果不是这样,请检查您的tsconfig.json文件的“files”或“filesGlob”部分。第1行col 1

在这里输入图像说明

你的tsconfig.json不在app 。 遵守http://www.typescriptlang.org/docs/handbook/tsconfig-json.html

使用tsconfig.json

 By invoking tsc with no input files, in which case the compiler searches for the tsconfig.json file starting in the current directory 

并继续父目录链。 通过调用没有input文件的tsc和一个指定包含tsconfig.json文件的目录的path或包含configuration的有效.json文件的path的–project(或者只是-p)命令行选项。