Skip to content

Instantly share code, notes, and snippets.

@lydemann
Last active July 6, 2018 18:05
Embed
What would you like to do?
import { Observable } from 'rxjs/Observable';
import { Injectable } from '@angular/core';
import { AppState } from '@app/store/state.model';
import { select } from '@angular-redux/store';
import { TODOItem } from '@app/shared/models/todo-item';
export const todoListSelector = (appState: AppState) => appState.todoList.todos;
@Injectable()
export class TodoListSelector {
@select(todoListSelector) todoList$: Observable<TODOItem[]>;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment