Hi i got a small question pertaining to ngrx i have two lazy loaded modules and i have a scenario where i have aonther third module named shared and i want these two modules to have access to the store that i want to put in the shared module. do you have any ideas how i can make this work.
The Store isn't something you put in a shared module to include in your feature modules. You only need register the Store using StoreModule.forRoot in the root NgModule, and then the Store service is available globally. Then any modules whether loaded lazily or not will be able inject the Store and have access to the global state.
Most helpful comment
The
Storeisn't something you put in a shared module to include in your feature modules. You only need register the Store usingStoreModule.forRootin the root NgModule, and then theStoreservice is available globally. Then any modules whether loaded lazily or not will be able inject theStoreand have access to the global state.