Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NGXS dispatch not calling action

I have been trying to set up NGXS state management with one e-commerce store I am making in Angular with Firebase as a backend. My state initializes as you see here.

Sadly I receive no message whatsoever when I try to dispatch an action from my auth-service.

The only changes I've made to the implementation of the state was to add an @Injectable decorator to my states when I export them out of their respective files.

I am not sure whether this is causing an issue, as I have received no error callback since I started debugging.

This is where I call the dispatch.

Here is the git repository for referencing.

like image 880
Inexperienced_Burger Avatar asked Oct 26 '25 07:10

Inexperienced_Burger


1 Answers

Make sure to add the 'StoreModule.forFeature()` import to the respective module.

like image 78
Albertino Júnior Avatar answered Oct 28 '25 22:10

Albertino Júnior