Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot instantiate cyclic dependency #10

Open
BaruchFisherman opened this issue Apr 5, 2016 · 1 comment
Open

Cannot instantiate cyclic dependency #10

BaruchFisherman opened this issue Apr 5, 2016 · 1 comment

Comments

@BaruchFisherman
Copy link

Hi,

I'm try to inject Action Creator into Saga middleware function.
But Im getting this error:
ORIGINAL EXCEPTION: Cannot instantiate cyclic dependency! (Token @ngrx/store Saga Effect -> ApplicativeRoomModel -> Store -> StoreBackend)

`
export const BingoRoomSaga = createSaga(function(applicativeRoom: ApplicativeRoomModel) {

return function(saga$: Observable) {
return saga$
.filter(iteration => iteration.action.type === 'ACTION')
.map((saga) => { ....... });
};

}, [ ApplicativeRoomModel ]);
`

ApplicativeRoomModel has:
constructor(private store: Store) { ..... }

I found that if i comment the store from constructor it's working just fine. but I need this store.

Any ideas?

@abdulhaq-e
Copy link

Similar to this #8

It would be great finding a neat solution other than creating a new service just for injecting the store.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants