相关疑难解决方法(0)

什么是未处理的承诺拒绝?

为了学习Angular 2,我正在尝试他们的教程.

我收到这样的错误:

(node:4796) UnhandledPromiseRejectionWarning: Unhandled promise rejection (r                                                                                                     ejection id: 1): Error: spawn cmd ENOENT
[1] (node:4796) DeprecationWarning: Unhandled promise rejections are deprecated.
In the future, promise rejections that are not handled will terminate the Node.
js process with a non-zero exit code.
Run Code Online (Sandbox Code Playgroud)

我在SO中经历了不同的问题和答案,但无法找出"未处理的承诺拒绝"是什么.

任何人都可以简单地解释一下它是什么Error: spawn cmd ENOENT,也是什么,当它出现时,我必须检查以摆脱这个警告?

javascript unhandled-exception spawn es6-promise angular

160
推荐指数
4
解决办法
26万
查看次数

使用 Zone.js 获取无区域窗口方法

可以通过加载的 Zone.js 以某种方式访问无区域window方法(setTimeout等)吗?Zone.js 是否公开了原始未修补的方法?

可能用例的示例是 Angular 2 应用程序,它在 Angular 2 Material 数据绑定方面存在一些问题,需要调用 un-zonedsetTimeout作为临时但即时的解决方法 - 在问题得到正确修复之前。

javascript typescript zonejs angular

6
推荐指数
2
解决办法
1043
查看次数