Last active
January 20, 2021 07:09
-
-
Save yackinn/8cd703cfb848e3f25a944d90c24c22c1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Injectable() | |
export class TodoEffects { | |
constructor( | |
private actions$: Actions, | |
private todoService: TodoService, | |
) { | |
} | |
loadTodos$ = createEffect(() => this.actions$.pipe( | |
ofType(TodoActions.loadTodos), | |
switchMap(() => this.todoService.get()) | |
)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment