Forked from praveenpuglia/same-effect-multiple-actions.ts
Created
October 23, 2018 00:47
-
-
Save lexeek/0239078256e6e50f1402fcb2ca5a5da3 to your computer and use it in GitHub Desktop.
Same effect for multiple actions - ngrx effects
This file contains 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({dispatch: false}) | |
entityCreationSuccess$: Observable<Action> = this.actions$.pipe( | |
ofType(UserActions.CREATE_USER_SUCCESS, PostActions.CREATE_POST_SUCCESS), | |
tap(action => { | |
this.router.navigate(['../'], {relativeTo: this.route}) | |
}) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment