var relative = af.database.object('users/user75ECZOiNtxZwYoezaXmYA9YwPm53', { preserveSnapshot: true });
relative.subscribe(
snapshot => {
this.usedBasicProfile = snapshot;
}
);
console.log(this.usedBasicProfile); //the value is undefined, how to make this work?
我想要做的是從firebase獲取數據,任何人都可以幫助我?如何使這行代碼工作?
你流汗任何錯誤 – Aravind
閱讀評論請 – Steveeeeee
這是異步流程,你不能得到的值同步。 –