Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- isCodeExist(code: string): Observable<Job[]> {
- return <Observable<Job[]>>this.afs
- .collection(this.jobsCollection, ref => ref
- .where('code', '==', code)
- .limit(1)
- )
- .valueChanges()
- .pipe(
- flatMap(jobs => jobs),
- catchError(err => throwError(err)
- )
- );
- }
Add Comment
Please, Sign In to add comment