Last active
February 25, 2018 17:46
-
-
Save paullessing/d878491e44789f9bce8635a4179b6af3 to your computer and use it in GitHub Desktop.
Handling Errors in NgRx Effects - Snippet 1 (AnalyticsEffects, no Error Handling)
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
@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