| 380 | } |
| 381 | |
| 382 | @Injectable() |
| 383 | class EffectWithOnInitAndResponse implements OnInitEffects { |
| 384 | response = createEffect(() => { |
| 385 | return this.actions$.pipe( |
| 386 | ofType('[EffectWithOnInitAndResponse]: INIT'), |
| 387 | map(() => ({ type: '[EffectWithOnInitAndResponse]: INIT Response' })) |
| 388 | ); |
| 389 | }); |
| 390 | |
| 391 | noop = createEffect(() => { |
| 392 | return this.actions$.pipe( |
| 393 | ofType('noop'), |
| 394 | map(() => ({ type: 'noop response' })) |
| 395 | ); |
| 396 | }); |
| 397 | |
| 398 | constructor(private actions$: Actions) {} |
| 399 | |
| 400 | ngrxOnInitEffects(): Action { |
| 401 | return { type: '[EffectWithOnInitAndResponse]: INIT' }; |
| 402 | } |
| 403 | } |
| 404 | |
| 405 | class RootEffectWithInitAction implements OnInitEffects { |
| 406 | ngrxOnInitEffects(): Action { |
nothing calls this directly
no test coverage detected