Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Effect()
- loadData$ = this.actions$.ofType(LOAD_DATA)
- .pipe(switchMap(() => {
- return this.apiService.getData().pipe(
- map(data => new LOAD_DATA_SUCCESS(data)),
- catchError(error => of(new LOAD_DATA_FAILURE(error)))
- );
- });
Add Comment
Please, Sign In to add comment