带有Angular2和Typescript的Visual Studio 2013 [英] Visual Studio 2013 with Angular2 and Typescript
问题描述
我正在使用 angular2 QUICKSTART ,但是我在使用Visual Studio无法通过 typescript 导入模块识别 Angular2 ,其余一切都很好:
I'm using the angular2 QUICKSTART and I have a problem where Visual Studio don't recognize Angular2 with typescript import Modules, in rest all it's fine:
它说:
找不到模块"angular2/platform/browser"
Cannot find module 'angular2/platform/browser'
我的应用程序:
- 正在编译.ts文件而没有错误
- 它可以在浏览器中正常运行
- 如果我以VS代码打开项目,则可以正常运行,在IDE中没有错误
我知道打字稿应该直接从 node_modules -> angular2 读取.d.ts文件,但无论如何,我还是尝试添加angular2 DefinitelyTyped 仍然没有用.
I know that typescript should read .d.ts file directly from node_modules --> angular2, but anyway I tried to add angular2 DefinitelyTyped and still not worked.
Atm我使用安装了打字稿1.5的VS 2013 Update 5(我也尝试过使用1.75)
Atm I use VS 2013 update 5 with typescript 1.5 installed (I also tried with 1.75)
推荐答案
使用Visual Studio 2015解决.
Solved by using Visual Studio 2015.
这篇关于带有Angular2和Typescript的Visual Studio 2013的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!