1

I'm working through upgrading our Angular 2 app from RC2 to final, we use the ngrx effects and store modules as well. Following the upgrade to new versions of all, and changes to instantiating the store and effects in the imports of ngmodule, I'm getting an error on an effect.

Part of the effect is reliant on an array of data that changes over time, so it is present in the store, and we can select it as just this.store.select(s=> s.locations) to get the slice we need.

This had been working fine before with the store getting injected into the constructor of the effect. The error is: Uncaught Error: Can't resolve all parameters for XXXX.effect.ts

The parameter in question is for private store: Store

2 questions I guess follow:

1) Should I be able to inject that store into the constructor and/or use a store select in an effect?

2) If not using the store, would it be preferable to pass the array through the update action payload?

1

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.