Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
todo-list.actions.ts
@Injectable({ providedIn: 'root' })
export class TodoListActions {
constructor(private store: Store<TodoListState>) {}
public loadTodoList(): void {
this.store.dispatch(new LoadTodoList());
}
public deleteTodo(id: string) {
this.store.dispatch(new TodoItemDeleted(id));
}
public todoItemUpdated(id: string) {
this.store.dispatch(new TodoItemDeleted(id));
}
public todoItemCompleted(id: string) {
this.store.dispatch(new TodoItemCompleted(id));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.