Created
November 10, 2019 14:57
-
-
Save CharGrnmn/94eb8b82e2d4bc60fe37c4daca88ff6d to your computer and use it in GitHub Desktop.
Pokemon map example
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
| @Effect() | |
| loadAllBlogPosts$: Observable<any> = this.actions$.pipe( | |
| ofType(PokemonActions.loadPokemon), | |
| mergeMap(() => | |
| this.postsService.getAll().pipe( | |
| map(posts => PokemonActions.loadPokemonSuccess({ posts })), | |
| catchError(message => of(PokemonActions.loadPostsFailed({ message }))) | |
| ) | |
| ) | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment