-
-
Save lydemann/27cea0d6872d435d11d157871916e593 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
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