Skip to content

Instantly share code, notes, and snippets.

@praveenpuglia
Created April 25, 2018 18:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save praveenpuglia/5867355739849cd1670b83f48b0d5a5a to your computer and use it in GitHub Desktop.
Save praveenpuglia/5867355739849cd1670b83f48b0d5a5a to your computer and use it in GitHub Desktop.
Dispatch multiple actions from ngrx effect
@Effect()
search$: Observable<Action> = this.actions$.pipe(
ofType(SearchActions.SEARCH),
switchMap(action => {
const query = action.payload;
return [new FetchPanel1Data(query), new FetchPanel2Data(query)];
})
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment