我正在将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