我的 ionic 3 angular 5 代码如下
getUser(uid:string){
console.log('start of getUser with uid:' + uid)
return new Promise((resolve, reject) =>
{
this.db.object("/users/" + uid).snapshotChanges().map(
(snapshot) => {return snapshot.payload.val()}
).subscribe(
res => {
console.log('response:' + res)
resolve(res)
},
err => {
console.log(err)
reject(err)
}
)
})
}
但是,使用 ionic 4 .map 不再起作用。我如何转换这段代码?