简体   繁体   English

在 TypeScript 中导入模块

[英]Importing modules in TypeScript

I`m working with the tutorial http://www.codeproject.com/Tips/1026938/AngularJS-Getting-Started-with-Visual-Studio and get the problem this line:我正在使用教程http://www.codeproject.com/Tips/1026938/AngularJS-Getting-Started-with-Visual-Studio并解决这一行的问题:

import {Component, View, bootstrap, NgFor} from "angular2/angular2";

and I got the problem in this line: TS2307 Cannot find module 'angular2/angular2' I have exactly same files and folders, as in tutorial.我在这一行遇到了问题:TS2307 找不到模块 'angular2/angular2' 我有与教程完全相同的文件和文件夹。 I try "typings/angular2/angular2", but this also didn`t help.我尝试了“typings/angular2/angular2”,但这也没有帮助。

See the step-4 in your-tutorial-link .请参阅your-tutorial-link 中的第 4 步。 These settings are required for visual studio to detect the module. Visual Studio 需要这些设置来检测模块。

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM