Skip to content

Instantly share code, notes, and snippets.

@LironHazan
Created October 16, 2020 05:52
Show Gist options
  • Save LironHazan/57665f4f12d65e0af6d89bcb38249d9a to your computer and use it in GitHub Desktop.
Save LironHazan/57665f4f12d65e0af6d89bcb38249d9a to your computer and use it in GitHub Desktop.
Vadim Krimsky example for example post
createTagsForTest$(count = 5): Observable<any[]> {
const rndName = btoa(String(Math.random())).substr(5, 5); // generate random string as tag name
const usersObs$ = [...Array(count).keys()].map((_) => createTag$(rndName)); // create an array of http requests as observables
return forkJoin(usersObs$) // will subscribe to each of the inner observables and when all complete will emit a list of results
.pipe(catchError(error => of(error)));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment