Skip to content

Cannot instantiate cyclic dependency #10

@BaruchFisherman

Description

@BaruchFisherman

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions