Skip to content

Instantly share code, notes, and snippets.

@praveenpuglia
Created April 25, 2018 19:04
Show Gist options
  • Save praveenpuglia/99f30eb6174012fb5a9220edc8332861 to your computer and use it in GitHub Desktop.
Save praveenpuglia/99f30eb6174012fb5a9220edc8332861 to your computer and use it in GitHub Desktop.
Same effect for multiple actions - ngrx effects
@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