Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
todo-list.selector.ts
export const getTodolistState = createFeatureSelector<TodoListState>('todoList');
export const todoListSelectorFn = createSelector(
getTodolistState,
(todoListState) => todoListState.todos
);
@Injectable({
providedIn: 'root'
})
export class TodoListSelector {
/**
*
*/
constructor(private store: Store<TodoListState>) {}
/**
* getTodoList
*/
public getTodoList() {
return this.store.select(todoListSelectorFn);
}
}
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.