Skip to content

Instantly share code, notes, and snippets.

@paullessing
Last active February 25, 2018 17:46
Show Gist options
  • Save paullessing/d878491e44789f9bce8635a4179b6af3 to your computer and use it in GitHub Desktop.
Save paullessing/d878491e44789f9bce8635a4179b6af3 to your computer and use it in GitHub Desktop.
Handling Errors in NgRx Effects - Snippet 1 (AnalyticsEffects, no Error Handling)
@Injectable()
export class AnalyticsEffects {
@Effect({ dispatch: false })
public routeChange$: Observable<void> = this.action$.pipe(
ofType(ROUTER_NAVIGATION),
map(({ payload }) => {
this.analyticsService.trackPageNavigation(payload);
})
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment