Angular2 + Visual Studio 2015 - 打字
Angular2 + Visual Studio 2015 - Typings
我在安装打字时遇到问题。我在 boot.ts 的顶部有以下行:
///<reference path="./../typings/browser/ambient/es6-shim/index.d.ts"/>
但是,node_modules中没有安装那个打字:
我有包含以下内容的 typings.json 文件:
{
"ambientDependencies": {
"es6-shim": "registry:dt/es6-shim#0.31.2+20160317120654",
"jasmine": "registry:dt/jasmine#2.2.0+20160412134438",
"node": "registry:dt/node#4.0.0+20160509154515"
}
}
根据所有 Google'ing,我应该能够 运行 "typings install" 安装它。但是,我只是没有看到它。当我 运行 该命令时,我所看到的是:
我missing/doing错了什么?
终于在这里找到了我的答案:
以上总结link:
基本上,最新的 Typings 安装有新的变化。
在 typings.json 文件中将 "ambientDependencies" 更改为 "globalDependencies"
所有类型都在项目根目录的 /typings 文件夹中 saved/stored,而不是 "node_modules"(我正在查找的位置)。相应地引用它们
我在安装打字时遇到问题。我在 boot.ts 的顶部有以下行:
///<reference path="./../typings/browser/ambient/es6-shim/index.d.ts"/>
但是,node_modules中没有安装那个打字:
我有包含以下内容的 typings.json 文件:
{
"ambientDependencies": {
"es6-shim": "registry:dt/es6-shim#0.31.2+20160317120654",
"jasmine": "registry:dt/jasmine#2.2.0+20160412134438",
"node": "registry:dt/node#4.0.0+20160509154515"
}
}
根据所有 Google'ing,我应该能够 运行 "typings install" 安装它。但是,我只是没有看到它。当我 运行 该命令时,我所看到的是:
我missing/doing错了什么?
终于在这里找到了我的答案:
以上总结link: 基本上,最新的 Typings 安装有新的变化。
在 typings.json 文件中将 "ambientDependencies" 更改为 "globalDependencies"
所有类型都在项目根目录的 /typings 文件夹中 saved/stored,而不是 "node_modules"(我正在查找的位置)。相应地引用它们