store-saga
store-saga copied to clipboard
Cannot instantiate cyclic dependency
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
}, [ 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?
Similar to this https://github.com/CodeSequence/store-saga/issues/8
It would be great finding a neat solution other than creating a new service just for injecting the store.