Created
June 24, 2018 04:01
-
-
Save subhanahmed047/7751606a30d3cbf16e5bee7e0da95d9f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
) | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment