Skip to content

Instantly share code, notes, and snippets.

@jtcrowson
Last active January 28, 2019 22:04
Show Gist options
  • Save jtcrowson/75f799cf0ba61cf68759386a02e80511 to your computer and use it in GitHub Desktop.
Save jtcrowson/75f799cf0ba61cf68759386a02e80511 to your computer and use it in GitHub Desktop.
// -- error.actions.ts --
export class LaunchErrorModal implements Action {
readonly type = ErrorActions.LaunchErrorModal;
}
// -- error.effects.ts --
@Effect({ dispatch: false })
launchErrorModal$: Observable<Action> = this.actions$.pipe(
ofType<LaunchErrorModal>(ErrorActions.LaunchErrorModal),
tap(() => this.dialog.open(ErrorModalComponent))
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment