PouchDB + Cloudant + Ionic2 - 适用于浏览器,在SIM /设备上出错

时间:2016-11-03 12:49:34

标签: ionic2 pouchdb cloudant

我正在构建一个使用本地PouchDB并与Cloudant数据库交互的ionic2应用程序。在浏览器上应用程序工作正常,但在iOS模拟器上,我收到以下错误。 ionic run ios -csafari console error

代码如下:

getHives() {
    return new Promise(resolve => {
      this.db.query('DesignDoc/ViewName', {
        include_docs: true,
        attachments: true,
        key: this.loggedInUser

      }).then(result => {

        this.someList = [];
        result.rows.map((row) => {
          console.log("Row : " + JSON.stringify(row));
          if (row.doc.type == "someCondition") {
            this.someList.push(row);
          }
        });
        resolve(this.someList);

        this.db.changes({
          live: true,
          since: 'now',
          include_docs: true,
          attachments: true,
          filter: '_view',
          view: 'DesignDoc/ViewName',
          key: this.loggedInUser

        }).on('change', (change) => {
          this.handleChange(change);
        });
      });

    }).catch((error) => {
      console.log("Error : " + error);
    });
  }

有人可以帮助我解决这里出现的问题吗......还有我的cloudant网址之后的_local / xyz ...文字是什么?

感谢。

0 个答案:

没有答案