Last active
July 17, 2022 15:15
-
-
Save greetclock/e3dcca64bdbebaa50d776ba614f8d81f 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
// https://github.com/greetclock/parts/blob/3eec90/libs/todos-data/src/lib/todos-facade.service.ts | |
// that's a simplified gist of the original facade. Follow the link to see the whole thing. | |
import { todos$ } from './todos.repository' | |
import { TodosDataService } from './todos-data.service' | |
export class TodosFacadeService { | |
todos$: Observable<Todo[]> = todos$ | |
constructor( | |
private todosData: TodosDataService | |
) {} | |
getTodos(): Observable<Todo[]> { | |
const todos$ = this.todosData.getTodos() | |
todos$.subscribe() | |
return todos$ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment