Docs misunderstanding #340
JamieGarcia123
started this conversation in
General
Replies: 1 comment
-
I think you should treat that more as a pseudo-code rather a functional piece of code that you can direct use. To answer your question, if it's a service (todos.service.ts), it'll have a member for HttpClient and todosUrl. So the code would look like:
If you look at the rest of the docs, you'll see that it uses the rxjs |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
in this example where is http and todosURL defined?
https://ngneat.github.io/elf/docs/features/requests/requests-status#selectrequeststatus
todos.service.ts
import { setTodos, trackTodosRequestsStatus } from './todos.repository';
export function fetchTodos() {
return http.get(todosUrl).pipe(
tap(setTodos),
trackTodosRequestsStatus('todos')
);
}
Beta Was this translation helpful? Give feedback.
All reactions