Chris Tarasovs
Chris Tarasovs

Reputation: 695

Angular vs Angular Universal with NGRX Store

Angular vs Angular Universal with NGRX Trying to understand how to work around @ngrx/store-devtools library for Angular Universal. I've set up this project that is a ng seed project using Angular Universal.

It has a language switcher and I can't seem to understand how the store works. Github project: https://github.com/ng-seed/universal

In the code you can see there are reducers for when you switch language, but in the devtools the state shows empty, so can't understand how it pushed to the state or how the state gets managed.

Upvotes: 4

Views: 852

Answers (1)

Martin Adámek
Martin Adámek

Reputation: 18409

You need to setup the @ngrx/store-devtools module first, I just tried this on that seed project and it works ok.

  1. Run npm i @ngrx/store-devtools --save to install the module.
  2. Add StoreDevtoolsModule.instrument() to the end imports array in CoreModule.
  3. Rebuild and serve (npm run build:universal-dev && npm run serve).

enter image description here

Upvotes: 3

Related Questions