How can I do something like that in ngrx/effects:
// I want to handle a sign up effect
return this.actions$.ofType(user.SIGN_UP_SUCCESS)
.map((action: user.SignUpSuccessAction) => action.payload)
.mergeMap(() => {
// then I have to call two other async actions to add new records
return [
new userOptions.Add(new UserOptionsModel());
new userInfo.Add(new UserInfoModel());
];
})
How can I handle success actions for both userOptions and userInfo actions and then redirect to a Dashboard page? I don't want to redirect to the Dashboard page if I dispatch userOptions.Add and userInfo.Add actions outside user.SIGN_UP_SUCCESS sequence, from other pages for example.
ANSWER
Victor Savkin. State Management Patterns and Best Practices with NgRx https://www.youtube.com/watch?v=vX2vG0o-rpM