【问题标题】:Typescript+Angular1.5+Angular UI router - Promise not foundTypescript+Angular1.5+Angular UI 路由器 - 未找到承诺
【发布时间】:2017-01-18 08:28:28
【问题描述】:

我在使用这组工具进行引导时遇到了问题。 我收到以下错误:

错误 C:\home\projects\angular-typescript-webpack\node_modules\angular-ui-router\commonjs\ng1\directives\viewDirective.d.ts (10,17):错误 TS2304:找不到名称“Promise”。

好吧,我试图安装 es6-promise,但实际上我必须: 在我收到此错误的每个文件中从 'es6-promise' 导入 {Promise}? 有更清洁的解决方案吗?

---编辑 好吧,我必须设置

"compilerOptions": {
    "target": "es6",

在 tsconfig.json 中 wchich 不是一个好主意

【问题讨论】:

    标签: angularjs typescript angular-ui-router typescript-typings


    【解决方案1】:

    好的。明白了。

    "typings install dt~es6-shim --global"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-05-17
      • 2014-09-16
      • 2017-08-05
      • 2017-01-28
      • 1970-01-01
      • 2016-12-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多