This page says \"toPromise has been deprecated! (RxJS 5.5+)\" but I\'ve been using it lately with AngularFire2 (when I only want one result) like this:
\"toPromise has been deprecated! (RxJS 5.5+)\"
You just should put after pipe!
.pipe(take(1)).toPromise