Kevin Beal
Kevin Beal

Reputation: 10859

How to use @ngrx/router-store inside feature module

In the NGRX documentation for Router-Store, they only provide an example with .forRoot(). When I tried using .forFeature() I discovered that no such static method exists.

I would like to be able to define certain actions & effects for use within my feature module (and the app module as well).

How does one go about using router-store inside of feature modules?

Upvotes: 5

Views: 1484

Answers (1)

Envil
Envil

Reputation: 2727

You don't need to set it up for feature modules. You only need to set it up once by StoreRouterConnectingModule.forRoot() in your app.module.ts, that's enough.

Upvotes: 1

Related Questions