Last active
July 7, 2019 17:38
-
-
Save alexytiger/7967276be43804de986169f87aadee6b 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
handleError$ = createEffect( | |
() => | |
this.actions$.pipe( | |
ofType(ErrorActions.errorMessage), | |
map(action => action.errorMsg), | |
tap(errorMsg => console.error('Got error:', errorMsg)), | |
map(errorMsg => { | |
const msg: SnackBarInterface = { | |
message: errorMsg, | |
color: AppearanceColor.Error | |
}; | |
return SnackBarActions.open({payload: msg}) | |
} ) | |
), | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment