2017-03-01 37 views
0

我想用打字稿导入jQuery和我做什么打字稿的官方教程说:如何在Typescript中导入外部依赖关系?

import * as $ from "jquery"; 

不过,我得到一个错误:

"cannot find module jquery"

你有任何想法如何解决这个问题?

+0

http://stackoverflow.com/questions/30623825/how-to-use-jquery-with-angular2 that should h; elp – putonspectacles

回答

0

您需要为库安装Typescript类型。运行npm install -SD @types/jquery

+0

它仍然没有解决。 – CrazySynthax