Example of updateRequestStatus to handle HttpClient errors #28
-
Hello, can you please provide an example of updateRequestStatus that shows how to handle errors of api calls using HttpClient in Angular? Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
NetanelBasal
Oct 16, 2021
Replies: 1 comment 5 replies
-
import { setRequestStatus } from '@ngneat/elf-requests';
this.http.get('').pipe(
tap((todos) => setTodos(todos)),
setRequestStatus(todosStore, 'todos')
) The above code will do everything for you. |
Beta Was this translation helpful? Give feedback.
5 replies
Answer selected by
ogix
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The above code will do everything for you.