【问题标题】:How to use Bluebird promises with Angular 5?如何在 Angular 5 中使用 Bluebird Promise?
【发布时间】:2018-05-06 08:57:45
【问题描述】:

Here's a link to the Plunker

我有一个项目,其中原生的Promise 实现被Bluebird 替换。我的理解是,为了在这种情况下成功使用 Angular 5,必须对 Bluebird 进行修补以使其成为“区域感知”。为此,我按照shown here 的说明进行操作。

不过,这似乎不起作用。 Zone.js 抛出以下错误:

未捕获的 RangeError:超出最大调用堆栈大小

有谁知道这个问题的解决方案吗?在此先感谢。

【问题讨论】:

标签: angular promise bluebird zone.js


【解决方案1】:

zone.js最新版本已支持bluebird,请等待zone.js新版本(0.8.21)。

https://github.com/angular/zone.js/pull/1039

关于使用,你可以在这里找到。 https://github.com/angular/zone.js/blob/master/NON-STANDARD-APIS.md#currently-supported-non-standard-common-apis

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-05-21
    • 2015-07-31
    • 1970-01-01
    • 2014-05-10
    • 1970-01-01
    • 2023-03-31
    • 2015-10-23
    • 2016-06-16
    相关资源
    最近更新 更多