Reputation: 1604
I have actions laden all over my app. I have a root effect EffectsModule.forRoot([AmplitudeEffects])
which runs to the below function
@Injectable()
export class AmplitudeEffects {
constructor(private actions$: Actions) {}
@Effect({ dispatch: false })
public amp = this.actions$.pipe(
tap(() =>
console.log(this.actions$)
AmplitudeService.sendValues(eventCategory, eventName, eventDescription, eventProperty)
)
);
}
but what I am seeing in the console is the tap()
i have on each effect showing the correct data, but the tap() => console.log(this.actions$)
is showing something else regarding the actions that I don't understand. How can I get a clearer console view of what actioned happened in which sequence through the EffectsModule.forRoot
... I would like to see the stuff coming out of index.js
in my console.log in amplitude.effects.ts... Any ideas?
Upvotes: 0
Views: 77
Reputation: 15505
You're logging the actions observable, but you need the action
@Effect({ dispatch: false })
public amp = this.actions$.pipe(
tap((action) =>
console.log(action)
AmplitudeService.sendValues(eventCategory, eventName, eventDescription, eventProperty)
)
);
Upvotes: 2