Guest User

Untitled

a guest
Jun 24th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. isCodeExist(code: string): Observable<Job[]> {
  2. return <Observable<Job[]>>this.afs
  3. .collection(this.jobsCollection, ref => ref
  4. .where('code', '==', code)
  5. .limit(1)
  6. )
  7. .valueChanges()
  8. .pipe(
  9. flatMap(jobs => jobs),
  10. catchError(err => throwError(err)
  11. )
  12. );
  13. }
Add Comment
Please, Sign In to add comment