ngrx-actions
ngrx-actions copied to clipboard
@Effect() decorator does not work
@Effect(MyAction)
decorator is not working, effect functions are never called.
Using @ngrx/effects @Effect()
works as expected.
Versions:
"@angular/core": "~7.0.0", "@ngrx/store": "^6.1.2", "@ngrx/effects": "^6.1.2", "ngrx-actions": "^4.0.0",
Example code
@Store(initialAppState)
export class AppStore {
@Action(TestAction)
test(state: AppState, action: TestAction) {
state.test = 1;
// this runs after dispatch
}
@Action(TestComplete)
complete(state: AppState) {
state.test = 2;
// never runs
}
@Effect(TestAction)
testEffect() {
//never runs
return of(new TestComplete());
}
}
I have tried this with every combination of EffectsModule.forRoot()
i could think of, passing empty array, array containing the store class, no EffectsModule import, etc..
Same issue here. @ngrx/effects module v.6.1.2 does not support.
EffectsModule.run(myEffects)
EffectsModule.runAfterBootstrap(trackingMyEffects)
Please provide any information on how to fix this issue on Angular 6.1.2. Thanks