在Angular 6中接收ZoneAwarePromise而不是常规的Promise

时间:2018-07-20 19:29:13

标签: angular

我正在Angular 6应用程序中使用algoliasearch库。

当我在Angular 6中执行以下代码时,我收到了ZoneAwarePromise对象,而不是正常的诺言

enter image description here

代码看起来像这样:

 fetchSingleUser(objectID) {
        const options = environment.algolia;
        const client = algoliasearch(options.appId, options.apiKey);
        this.index = client.initIndex(options.indexName);
        return this.index.getObject(objectID)

    }

再次明确一点,与阿尔及利亚的联系很好。但是,我收到的不是ZoneAwarePromise,而是正常的诺言。我不确定该如何处理?

0 个答案:

没有答案