财产'更新'不会退出类型Observable - Ionic3

时间:2017-10-02 08:27:05

标签: angular ionic3 angularfire2

我正在将ionic2更新为3 / Angularfire2。

导入

import { AngularFireDatabase } from 'angularfire2/database';
import { Observable } from "rxjs/Observable"

构造函数

constructor(private _af: AngularFireDatabase) {}

有功能:

 createProcess(uid: string, process: Process) {
    const newProcessKey = this.getProcesses(uid).push(process).key;
    return this.getProcess(uid, newProcessKey).update({ status: 1, liked: false }).then(() => newProcessKey);
  }

getProcess功能:

  getProcess(uid: string, processId: string): Observable<Process> {
    return this._af.object(`/process/${uid}/${processId}`);
  }

我收到错误:

属性&#39;更新&#39;不会退出类型Observable property&#39; push&#39;不会退出类型Observable

0 个答案:

没有答案