Created
February 20, 2019 07:04
-
-
Save lydemann/0226315feeecb64969d8f9d06536c96f to your computer and use it in GitHub Desktop.
todo-list.actions.ts
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({ 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