When I fetch data from database, it shows this error:
"Property
subscribe
does not exist on typePromise<any>
."
How can I solve this error?
This is my code:
getUsers(){
return new Promise<any>((resolve, reject) => {
this.afs.collection('/users').snapshotChanges()
.subscribe(snapshots => {
resolve(snapshots)
})
})
}